Skip to content

Commit 1c8897d

Browse files
committed
Fix syntax highlight inconsistencies in Go code
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]>
1 parent ea7ff9c commit 1c8897d

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

colors/nord.vim

+20-2
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,12 @@ call s:hi("Conditional", s:nord9_gui, "", s:nord9_term, "", "", "")
278278
call s:hi("Constant", s:nord4_gui, "", "NONE", "", "", "")
279279
call s:hi("Define", s:nord9_gui, "", s:nord9_term, "", "", "")
280280
call s:hi("Delimiter", s:nord6_gui, "", s:nord6_term, "", "", "")
281+
call s:hi("Semicolon", s:nord9_gui, "", s:nord9_term, "", "", "")
282+
call s:hi("QuotationsMarks", s:nord6_gui, "", s:nord6_term, "", "", "")
281283
call s:hi("Exception", s:nord9_gui, "", s:nord9_term, "", "", "")
282284
call s:hi("Float", s:nord15_gui, "", s:nord15_term, "", "", "")
283285
call s:hi("Function", s:nord8_gui, "", s:nord8_term, "", "", "")
286+
call s:hi("FormatSpecifier", s:nord13_gui, "", s:nord13_term, "", "", "")
284287
call s:hi("Identifier", s:nord4_gui, "", "NONE", "", "NONE", "")
285288
call s:hi("Include", s:nord9_gui, "", s:nord9_term, "", "", "")
286289
call s:hi("Keyword", s:nord9_gui, "", s:nord9_term, "", "", "")
@@ -397,8 +400,6 @@ hi! link diffRemoved DiffDelete
397400

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

400-
call s:hi("goBuiltins", s:nord7_gui, "", s:nord7_term, "", "", "")
401-
hi! link goConstants Keyword
402403

403404
call s:hi("helpBar", s:nord3_gui, "", s:nord3_term, "", "", "")
404405
call s:hi("helpHyperTextJump", s:nord8_gui, "", s:nord8_term, "", s:underline, "")
@@ -571,6 +572,23 @@ call s:hi("CocErrorSign" , s:nord11_gui, "", s:nord11_term, "", "", "")
571572
call s:hi("CocInfoSign" , s:nord8_gui, "", s:nord8_term, "", "", "")
572573
call s:hi("CocHintSign" , s:nord10_gui, "", s:nord10_term, "", "", "")
573574

575+
" vim-go
576+
" > faith/vim-go
577+
call s:hi("goBuiltins", s:nord7_gui, "", s:nord7_term, "", "", "")
578+
hi! link goConstants Keyword
579+
hi! link goFunctionCall Function
580+
hi! link goFormatSpecifier FormatSpecifier
581+
hi! link goEscapeOctal FormatSpecifier
582+
hi! link goEscapeC FormatSpecifier
583+
hi! link goEscapeX FormatSpecifier
584+
hi! link goEscapeU FormatSpecifier
585+
hi! link goEscapeBigU FormatSpecifier
586+
hi! link goEscapeError FormatSpecifier
587+
" TODO: these are not exposed by vim-go so you need to add
588+
" these groups to vim-go
589+
" hi! link goSemicolon Semicolon
590+
" hi! link goQuotationsMarks QuotationsMarks
591+
574592
" Nvim LSP
575593
" > neovim/nvim-lsp
576594
call s:hi("LSPDiagnosticsWarning", s:nord13_gui, "", s:nord13_term, "", "", "")

0 commit comments

Comments
 (0)