nvim: Update syntax highlighting for nvim-treesitter

All the added highlight groups in this commit are not defined upstream
in nvim-highlite. We may change this later.

While at it, remove all 'link' usages.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
Sanchayan Maity 2020-09-09 16:59:28 +05:30
parent b25091fae6
commit bfd2e9bd62

View file

@ -55,9 +55,9 @@ local highlight_group_normal = {bg=black, fg=white, style=NONE}
local highlight_groups = {
--[[ 4.1. Text Analysis ]]
Comment = {bg=NONE, fg=warmgrey, style='italic'},
EndOfBuffer = {link='NonText' },
EndOfBuffer = 'NonText',
NonText = {bg=NONE, fg=lightgrey, style=NONE },
Whitespace = {link='NonText' },
Whitespace = 'NonText',
--[[ 4.1.1. Literals]]
Constant = {bg=NONE, fg=purple, style=NONE},
@ -65,7 +65,7 @@ local highlight_groups = {
Character = {bg=NONE, fg=yellow, style=NONE},
Number = {bg=NONE, fg=purple, style=NONE},
Boolean = {bg=NONE, fg=purple, style=NONE},
Float = {link='Number' },
Float = 'Number',
--[[ 4.1.2. Identifiers]]
Identifier = {bg=NONE, fg=green, style=NONE},
@ -74,7 +74,7 @@ local highlight_groups = {
--[[ 4.1.3. Syntax]]
Statement = {bg=NONE, fg=pink, style=NONE },
Conditional = {bg=NONE, fg=pink, style='italic'},
Repeat = {link='Keyword' },
Repeat = 'Keyword',
Label = {bg=NONE, fg=pink, style='italic'},
Operator = {bg=NONE, fg=pink, style=NONE },
Keyword = {bg=NONE, fg=pink, style='bold' },
@ -85,7 +85,7 @@ local highlight_groups = {
PreProc = {bg=NONE, fg=green, style=NONE },
Include = {bg=NONE, fg=pink, style='nocombine'},
Define = {bg=NONE, fg=pink, style='nocombine'},
Macro = {link='Define' },
Macro = {bg=NONE, fg=orange, style={'bold', 'nocombine'}},
PreCondit = {bg=NONE, fg=green, style='nocombine'},
--[[ 4.1.5. Semantics]]
@ -96,21 +96,21 @@ local highlight_groups = {
--[[ 4.1.6. Edge Cases]]
Special = {bg=NONE, fg=purple, style=NONE },
SpecialChar = {link='Character' },
SpecialKey = {link='Character' },
Tag = {link='Underlined' },
SpecialChar = 'Character' ,
SpecialKey = 'Character' ,
Tag = 'Underlined',
Delimiter = {bg=NONE, fg=pink, style=NONE },
-- SpecialComment affects Haskell Language Extension
SpecialComment = {bg=NONE, fg=orange, style={'bold', 'nocombine'}},
Debug = {link='WarningMsg' },
Debug = 'WarningMsg',
--[[ 4.1.7. Help Syntax]]
Underlined = {bg=NONE, fg=green, style='underline' },
Ignore = {bg=NONE, fg=gray, style=NONE },
Error = {bg=black, fg=red, style=NONE },
Todo = {bg=NONE, fg=orange, style={'bold', 'underline'}},
helpHyperTextJump = {link='Underlined' },
helpSpecial = {link='Function' },
helpHyperTextJump = 'Underlined',
helpSpecial = 'Function' ,
Hint = {bg=lightblack3, fg=white, style='bold' },
Info = {bg=pink, fg=black, style='bold' },
Warning = {bg=orange, fg=black, style='bold' },
@ -119,8 +119,8 @@ local highlight_groups = {
--[[ 4.2.1. Status Line]]
StatusLine = {bg=black, fg=warmgrey, style='inverse'},
StatusLineNC = {bg=black, fg=darkgrey, style='inverse'},
StatusLineTerm = {link='StatusLine' },
StatusLineTermNC = {link='StatusLineNC' },
StatusLineTerm = 'StatusLine' ,
StatusLineTermNC = 'StatusLineNC',
--[[ 4.2.2. Separators]]
VertSplit = {bg=darkblack, fg=darkgrey, style=NONE },
@ -133,8 +133,8 @@ local highlight_groups = {
--Conceal={}
CursorLine = {bg=lightblack2, fg=NONE, style=NONE },
CursorLineNr = {bg=lightblack, fg=orange,style=NONE },
debugBreakpoint = {link='ErrorMsg' },
debugPC = {link='ColorColumn' },
debugBreakpoint = 'ErrorMsg' ,
debugPC = 'ColorColumn',
LineNr = {bg=lightblack, fg=grey, style=NONE },
QuickFixLine = {bg=darkgrey, fg=NONE, style=NONE },
Visual = {bg=NONE, fg=NONE, style='inverse'},
@ -181,30 +181,30 @@ local highlight_groups = {
Question = {bg=black, fg=yellow, style='underline'},
--[[ 4.2.11. LSP ]]
LspDiagnosticsError = {link='Error' },
LspDiagnosticsErrorFloating = {link='ErrorMsg'},
LspDiagnosticsErrorSign = {link='ErrorMsg' },
LspDiagnosticsError = 'Error' ,
LspDiagnosticsErrorFloating = 'ErrorMsg',
LspDiagnosticsErrorSign = 'ErrorMsg',
LspDiagnosticsWarning = {link='Warning' },
LspDiagnosticsWarningFloating = {link='WarningMsg'},
LspDiagnosticsWarningSign = {link='WarningMsg' },
LspDiagnosticsWarning = 'Warning' ,
LspDiagnosticsWarningFloating = 'WarningMsg',
LspDiagnosticsWarningSign = 'WarningMsg',
LspDiagnosticsHint = {link='Hint' },
LspDiagnosticsHintFloating = {link='HintMsg'},
LspDiagnosticsHintSign = {link='HintMsg' },
LspDiagnosticsHint = 'Hint' ,
LspDiagnosticsHintFloating = 'HintMsg',
LspDiagnosticsHintSign = 'HintMsg',
LspDiagnosticsInformation = {link='Info' },
LspDiagnosticsInformationFloating = {link='InfoMsg'},
LspDiagnosticsInformationSign = {link='InfoMsg' },
LspDiagnosticsInformation = 'Info' ,
LspDiagnosticsInformationFloating = 'InfoMsg',
LspDiagnosticsInformationSign = 'InfoMsg',
--[[ 4.2.12. Cursor ]]
Cursor = {bg=white, fg=black, style='inverse'},
CursorIM = {link='Cursor' },
CursorIM = 'Cursor',
CursorColumn = {bg=lightblack2,fg=NONE, style=NONE },
--[[ 4.2.13. Misc ]]
Directory = {bg=NONE, fg=aqua, style='bold'},
Terminal = {link='Normal' },
Terminal = 'Normal',
NormalFloat = {bg=black, fg=white, style=NONE },
--[[ 4.3. Programming Languages
@ -457,13 +457,13 @@ local highlight_groups = {
--[[ 4.4.2. coc.nvim ]]
CocErrorHighlight = {bg=NONE, fg=NONE, style={'undercurl', color='red' }},
CocErrorSign = {link='ALEErrorSign' },
CocErrorSign = 'ALEErrorSign',
CocHintHighlight = {bg=NONE, fg=NONE, style={'undercurl', color='purple' }},
CocHintSign = {link='HintMsg' },
CocHintSign = 'HintMsg',
CocInfoHighlight = {bg=NONE, fg=NONE, style={'undercurl', color='pink' }},
CocInfoSign = {link='InfoMsg' },
CocInfoSign = 'InfoMsg',
CocWarningHighlight = {bg=NONE, fg=NONE, style={'undercurl', color='orange' }},
CocWarningSign = {link='ALEWarningSign' },
CocWarningSign = 'ALEWarningSign',
--[[ 4.4.2. vim-jumpmotion / vim-easymotion ]]
EasyMotion = 'IncSearch' ,
@ -503,13 +503,48 @@ local highlight_groups = {
NERDTreeLinkTarget = 'Tag' ,
--[[ 4.4.8. nvim-treesitter ]]
TSConstBuiltin = 'Constant',
TSConstructor = 'Typedef',
TSFuncBuiltin = 'Function',
TSStringEscape = 'Character',
TSStringRegex = 'SpecialChar',
TSError = 'Error',
TSPunctDelimiter = 'Delimiter',
TSPunctBracket = 'Delimiter',
TSPunctSpecial = 'Special',
TSConstant = 'Constant',
TSConstBuiltin = 'Type',
TSConstMacro = 'Define',
TSString = 'String',
TSStringRegex = 'String',
TSStringEscape = 'SpecialChar',
TSCharacter = 'Character',
TSNumber = 'Number',
TSBoolean = 'Boolean',
TSFloat = 'Float',
TSFunction = 'Function',
TSFuncBuiltin = 'Special',
TSFuncMacro = 'Macro',
TSParameter = 'Identifier',
TSParameterReference = 'Type',
TSMethod = 'Function',
TSField = 'Identifier',
TSProperty = 'Identifier',
TSConstructor = 'Type',
TSConditional = 'Conditional',
TSRepeat = 'Repeat',
TSLabel = 'Label',
TSOperator = 'Operator',
TSKeyword = 'Keyword',
TSKeywordFunction = 'Keyword',
TSException = 'Exception',
TSType = 'Type',
TSTypeBuiltin = 'Type',
TSStructure = 'Structure',
TSInclude = 'Include',
TSAnnotation = 'SpecialChar',
TSText = 'String',
TSStrong = 'Special',
TSEmphasis = 'Underlined',
TSUnderline = 'Underlined',
TSTitle = 'Comment',
TSLiteral = 'Character',
TSURI = 'Tag',
TSVariableBuiltin = 'Identifier',
--[[ 4.4.9 SearchLight ]]
SearchLight = {bg=black, fg=orange, style={'bold', 'italic', 'underline'}},