diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-01-25 16:56:10 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-01-25 16:56:10 +0100 |
commit | 35ea4d2b9072594b6c0ccf87bde7978ed9f94755 (patch) | |
tree | e829bad239fea3150cd0963933f3e33214f069b4 /syntax/go.vim | |
parent | 967486dd716de860db3ef091a9dcb9cb65023534 (diff) | |
download | vim-polyglot-4.2.1.tar.gz vim-polyglot-4.2.1.zip |
Updatev4.2.1
Diffstat (limited to 'syntax/go.vim')
-rw-r--r-- | syntax/go.vim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/syntax/go.vim b/syntax/go.vim index 38a4993c..fef0e689 100644 --- a/syntax/go.vim +++ b/syntax/go.vim @@ -395,6 +395,24 @@ function! s:hi() hi def link goDiagnosticError SpellBad hi def link goDiagnosticWarning SpellRare + " TODO(bc): is it appropriate to define text properties in a syntax file? + " The highlight groups need to be defined before the text properties types + " are added, and when users have syntax enabled in their vimrc after + " filetype plugin on, the highlight groups won't be defined when + " ftplugin/go.vim is executed when the first go file is opened. + " See https://github.com/fatih/vim-go/issues/2658. + if exists('*prop_type_add') + if empty(prop_type_get('goSameId')) + call prop_type_add('goSameId', {'highlight': 'goSameId'}) + endif + if empty(prop_type_get('goDiagnosticError')) + call prop_type_add('goDiagnosticError', {'highlight': 'goDiagnosticError'}) + endif + if empty(prop_type_get('goDiagnosticWarning')) + call prop_type_add('goDiagnosticWarning', {'highlight': 'goDiagnosticWarning'}) + endif + endif + hi def link goDeclsFzfKeyword Keyword hi def link goDeclsFzfFunction Function hi def link goDeclsFzfSpecialComment SpecialComment |