diff --git a/doc/vim-go.txt b/doc/vim-go.txt index 9adb8960fe..c4bed58a1e 100644 --- a/doc/vim-go.txt +++ b/doc/vim-go.txt @@ -1250,7 +1250,7 @@ Maximum height for the GoDoc window created with |:GoDoc|. Default is 20. > *'g:go_doc_url'* godoc server URL used when |:GoDocBrowser| is used. Change if you want to use -a private internal service. Default is 'https://godoc.org'. +a private internal service. Default is 'https://godoc.org'. > let g:go_doc_url = 'https://godoc.org' < @@ -1725,7 +1725,7 @@ Highlight operators such as `:=` , `==`, `-=`, etc. < *'g:go_highlight_functions'* -Highlight function names. +Highlight function and method declarations. > let g:go_highlight_functions = 0 < @@ -1737,11 +1737,11 @@ declarations. Setting this implies the functionality from > let g:go_highlight_function_arguments = 0 < - *'g:go_highlight_methods'* + *'g:go_highlight_function_calls'* -Highlight method names. +Highlight function and method calls. > - let g:go_highlight_methods = 0 + let g:go_highlight_function_calls = 0 < *'g:go_highlight_types'* diff --git a/syntax/go.vim b/syntax/go.vim index c4bc45a09c..31fe96128b 100644 --- a/syntax/go.vim +++ b/syntax/go.vim @@ -42,8 +42,8 @@ if !exists("g:go_highlight_function_arguments") let g:go_highlight_function_arguments = 0 endif -if !exists("g:go_highlight_methods") - let g:go_highlight_methods = 0 +if !exists("g:go_highlight_function_calls") + let g:go_highlight_function_calls = 0 endif if !exists("g:go_highlight_fields") @@ -360,7 +360,6 @@ hi def link goOperator Operator " Functions; if g:go_highlight_functions isnot 0 || g:go_highlight_function_arguments isnot 0 - syn match goFunctionCall /\w\+\ze(/ contains=goBuiltins,goDeclaration syn match goDeclaration /\/ nextgroup=goReceiver,goFunction,goSimpleArguments skipwhite skipnl syn match goReceiverVar /\w\+\ze\s\+\(\w\|\*\)/ nextgroup=goPointerOperator,goReceiverType skipwhite skipnl contained syn match goPointerOperator /\*/ nextgroup=goReceiverType contained skipwhite skipnl @@ -379,13 +378,12 @@ else syn keyword goDeclaration func endif hi def link goFunction Function -hi def link goFunctionCall Type -" Methods; -if g:go_highlight_methods != 0 - syn match goMethodCall /\.\w\+\ze(/hs=s+1 +" Function calls; +if g:go_highlight_function_calls != 0 + syn match goFunctionCall /\w\+\ze(/ contains=goBuiltins,goDeclaration endif -hi def link goMethodCall Type +hi def link goFunctionCall Type " Fields; if g:go_highlight_fields != 0