Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename go_highlight_methods to go_highlight_function_calls #1557

Merged
merged 1 commit into from
Jan 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions doc/vim-go.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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'
<
Expand Down Expand Up @@ -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
<
Expand All @@ -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'*

Expand Down
14 changes: 6 additions & 8 deletions syntax/go.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -348,7 +348,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 /\<func\>/ 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
Expand All @@ -367,13 +366,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
Expand Down