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