Просмотр исходного кода

Touch up go syntax highlighting

Andrew Swistak 8 лет назад
Родитель
Сommit
71b3507c51
2 измененных файлов с 14 добавлено и 0 удалено
  1. 13 0
      vim/after/syntax/go.vim
  2. 1 0
      vimrc

+ 13 - 0
vim/after/syntax/go.vim

@@ -0,0 +1,13 @@
+if !exists("g:go_highlight_types")
+  let g:go_highlight_types = 0
+endif
+
+" Some plugin is swallowing first braces. use this for now
+" FIXME: Find meddling plugin
+if g:go_highlight_types != 0
+  syn match goTypeConstructor      /\<\w\+\({\)\@=/
+endif
+
+" I like green, ok? And these are functions.. not types. Jeez
+hi def link goFunctionCall Function
+hi def link goMethodCall   Function

+ 1 - 0
vimrc

@@ -400,3 +400,4 @@ let g:vim_json_syntax_conceal = 1
 com! FormatJSON %!python -m json.tool
 
 let g:ophigh_highlight_link_group = "Operator"
+