Skip to content

Commit

Permalink
Fix syntax highlight inconsistencies in Go code
Browse files Browse the repository at this point in the history
Function calls and format specifier are not printed correctly.
Usually people are using `faith/vim-go` to group these highlights.
We add the corresponding color the vim-go groups. Still there
are some groups that are not present/defined in vim-go. I've added
a comment there for future fix.

Signed-off-by: hoenirvili <[email protected]>
  • Loading branch information
hoenirvili committed Feb 8, 2021
1 parent ea7ff9c commit 1c8897d
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions colors/nord.vim
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,12 @@ call s:hi("Conditional", s:nord9_gui, "", s:nord9_term, "", "", "")
call s:hi("Constant", s:nord4_gui, "", "NONE", "", "", "")
call s:hi("Define", s:nord9_gui, "", s:nord9_term, "", "", "")
call s:hi("Delimiter", s:nord6_gui, "", s:nord6_term, "", "", "")
call s:hi("Semicolon", s:nord9_gui, "", s:nord9_term, "", "", "")
call s:hi("QuotationsMarks", s:nord6_gui, "", s:nord6_term, "", "", "")
call s:hi("Exception", s:nord9_gui, "", s:nord9_term, "", "", "")
call s:hi("Float", s:nord15_gui, "", s:nord15_term, "", "", "")
call s:hi("Function", s:nord8_gui, "", s:nord8_term, "", "", "")
call s:hi("FormatSpecifier", s:nord13_gui, "", s:nord13_term, "", "", "")
call s:hi("Identifier", s:nord4_gui, "", "NONE", "", "NONE", "")
call s:hi("Include", s:nord9_gui, "", s:nord9_term, "", "", "")
call s:hi("Keyword", s:nord9_gui, "", s:nord9_term, "", "", "")
Expand Down Expand Up @@ -397,8 +400,6 @@ hi! link diffRemoved DiffDelete

call s:hi("gitconfigVariable", s:nord7_gui, "", s:nord7_term, "", "", "")

call s:hi("goBuiltins", s:nord7_gui, "", s:nord7_term, "", "", "")
hi! link goConstants Keyword

call s:hi("helpBar", s:nord3_gui, "", s:nord3_term, "", "", "")
call s:hi("helpHyperTextJump", s:nord8_gui, "", s:nord8_term, "", s:underline, "")
Expand Down Expand Up @@ -571,6 +572,23 @@ call s:hi("CocErrorSign" , s:nord11_gui, "", s:nord11_term, "", "", "")
call s:hi("CocInfoSign" , s:nord8_gui, "", s:nord8_term, "", "", "")
call s:hi("CocHintSign" , s:nord10_gui, "", s:nord10_term, "", "", "")

" vim-go
" > faith/vim-go
call s:hi("goBuiltins", s:nord7_gui, "", s:nord7_term, "", "", "")
hi! link goConstants Keyword
hi! link goFunctionCall Function
hi! link goFormatSpecifier FormatSpecifier
hi! link goEscapeOctal FormatSpecifier
hi! link goEscapeC FormatSpecifier
hi! link goEscapeX FormatSpecifier
hi! link goEscapeU FormatSpecifier
hi! link goEscapeBigU FormatSpecifier
hi! link goEscapeError FormatSpecifier
" TODO: these are not exposed by vim-go so you need to add
" these groups to vim-go
" hi! link goSemicolon Semicolon
" hi! link goQuotationsMarks QuotationsMarks

" Nvim LSP
" > neovim/nvim-lsp
call s:hi("LSPDiagnosticsWarning", s:nord13_gui, "", s:nord13_term, "", "", "")
Expand Down

0 comments on commit 1c8897d

Please sign in to comment.