nvim: Sync with changes to nvim-highlite upstream

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
Sanchayan Maity 2020-09-02 16:55:45 +05:30
parent d59e74f588
commit b006265b14
2 changed files with 203 additions and 163 deletions

View file

@ -214,12 +214,12 @@ local highlight_groups = {
]] ]]
--[[ 4.3.1. C ]] --[[ 4.3.1. C ]]
cConstant = {link='Constant'}, cConstant = 'Constant',
cCustomClass = {link='Type' }, cCustomClass = 'Type' ,
--[[ 4.3.2. C++ ]] --[[ 4.3.2. C++ ]]
cppSTLexception = {link='Exception'}, cppSTLexception = 'Exception',
cppSTLnamespace = {link='String' }, cppSTLnamespace = 'String' ,
--[[ 4.3.3 C# ]] --[[ 4.3.3 C# ]]
csBraces = 'Delimiter', csBraces = 'Delimiter',
@ -227,6 +227,9 @@ local highlight_groups = {
csClassType = 'Type', csClassType = 'Type',
csContextualStatement = 'Conditional', csContextualStatement = 'Conditional',
csEndColon = 'Delimiter', csEndColon = 'Delimiter',
csGeneric = 'Typedef',
csInterpolation = 'Include',
csInterpolationDelimiter = 'SpecialChar',
csLogicSymbols = 'Operator', csLogicSymbols = 'Operator',
csModifier = 'Keyword', csModifier = 'Keyword',
csNew = 'Operator', csNew = 'Operator',
@ -258,34 +261,34 @@ local highlight_groups = {
scssVariableAssignment = 'Operator', scssVariableAssignment = 'Operator',
--[[ 4.3.5. Dart ]] --[[ 4.3.5. Dart ]]
dartLibrary = {link='Statement'}, dartLibrary = 'Statement',
--[[ 4.3.6. dot ]] --[[ 4.3.6. dot ]]
dotKeyChar = {link='Character'}, dotKeyChar = 'Character',
dotType = {link='Type' }, dotType = 'Type' ,
--[[ 4.3.7. Go ]] --[[ 4.3.7. Go ]]
goBlock = {link='Delimiter' }, goBlock = 'Delimiter' ,
goBoolean = {link='Boolean' }, goBoolean = 'Boolean' ,
goBuiltins = {link='Operator' }, goBuiltins = 'Operator' ,
goField = {link='Identifier' }, goField = 'Identifier',
goFloat = {link='Float' }, goFloat = 'Float' ,
goFormatSpecifier = {link='Character' }, goFormatSpecifier = 'Character' ,
goFunction = {link='Function' }, goFunction = 'Function' ,
goFunctionCall = {link='goFunction' }, goFunctionCall = 'goFunction',
goFunctionReturn = {bg=NONE, fg=NONE, style=NONE}, goFunctionReturn = {bg=NONE, fg=NONE, style=NONE},
goMethodCall = {link='goFunctionCall' }, goMethodCall = 'goFunctionCall',
goParamType = {link='goReceiverType' }, goParamType = 'goReceiverType',
goPointerOperator = {link='SpecialChar' }, goPointerOperator = 'SpecialChar' ,
goPredefinedIdentifiers = {link='Constant' }, goPredefinedIdentifiers = 'Constant' ,
goReceiver = {link='goBlock' }, goReceiver = 'goBlock' ,
goReceiverType = {link='goTypeName' }, goReceiverType = 'goTypeName' ,
goSimpleParams = {link='goBlock' }, goSimpleParams = 'goBlock' ,
goType = {link='Type' }, goType = 'Type' ,
goTypeConstructor = {link='goFunction' }, goTypeConstructor = 'goFunction' ,
goTypeName = {link='Type' }, goTypeName = 'Type' ,
goVarAssign = {link='Identifier' }, goVarAssign = 'Identifier' ,
goVarDefs = {link='goVarAssign' }, goVarDefs = 'goVarAssign' ,
--[[ 4.3.8. HTML ]] --[[ 4.3.8. HTML ]]
htmlArg = 'Label', htmlArg = 'Label',
@ -305,13 +308,13 @@ local highlight_groups = {
htmlTagName = 'Type', htmlTagName = 'Type',
--[[ 4.3.9. Java ]] --[[ 4.3.9. Java ]]
javaClassDecl = {link='Structure'}, javaClassDecl = 'Structure',
--[[ 4.3.10. JavaScript ]] --[[ 4.3.10. JavaScript ]]
jsFuncBlock = {link='Function' }, jsFuncBlock = 'Function' ,
jsObjectKey = {link='Type' }, jsObjectKey = 'Type' ,
jsReturn = {link='Keyword' }, jsReturn = 'Keyword' ,
jsVariableDef = {link='Identifier'}, jsVariableDef = 'Identifier',
--[[ 4.3.11. JSON ]] --[[ 4.3.11. JSON ]]
jsonBraces = 'luaBraces', jsonBraces = 'luaBraces',
@ -322,8 +325,8 @@ local highlight_groups = {
jsonStringSQError = 'Exception', jsonStringSQError = 'Exception',
--[[ 4.3.12. Make ]] --[[ 4.3.12. Make ]]
makeCommands = {link='Statment'}, makeCommands = 'Statment',
makeSpecTarget = {link='Type' }, makeSpecTarget = 'Type' ,
--[[ 4.3.13. Markdown ]] --[[ 4.3.13. Markdown ]]
markdownH1 = {bg=NONE, fg=green_dark, style='bold' }, markdownH1 = {bg=NONE, fg=green_dark, style='bold' },
@ -333,89 +336,98 @@ local highlight_groups = {
markdownH5 = {bg=NONE, fg=orange, style='bold' }, markdownH5 = {bg=NONE, fg=orange, style='bold' },
markdownH6 = {bg=NONE, fg=yellow, style='bold' }, markdownH6 = {bg=NONE, fg=yellow, style='bold' },
mkdBold = {bg=NONE, fg='green', style='bold' }, mkdBold = {bg=NONE, fg='green', style='bold' },
mkdCode = {link='Comment' }, mkdBold = 'SpecialComment',
mkdCodeDelimiter = {link='Delimiter' }, mkdCode = 'Statement',
mkdItalic = {bg=NONE, fg=green, style='italic'}, mkdCodeDelimiter = 'mkdBold',
mkdListItem = {link='Special' }, mkdCodeStart = 'mkdCodeDelimiter',
mkdNonListItemBlock = {link='Normal' }, mkdCodeEnd = 'mkdCodeStart',
texMathZoneY = {link='String' }, mkdHeading = 'Delimiter',
mkdItalic = 'mkdBold',
mkdListItem = 'Special',
mkdRule = 'Underlined',
texMathMatcher = 'Number',
texMathZoneX = 'Number',
texMathZoneY = 'Number',
--[[ 4.3.20. Python ]] --[[ 4.3.20. Python ]]
pythonBrackets = {link='Delimiter' }, pythonBrackets = 'Delimiter' ,
pythonBuiltinFunc = {link='Operator' }, pythonBuiltinFunc = 'Operator' ,
pythonBuiltinObj = {link='Type' }, pythonBuiltinObj = 'Type' ,
pythonBuiltinType = {link='Type' }, pythonBuiltinType = 'Type' ,
pythonClass = {link='Structure' }, pythonClass = 'Structure' ,
pythonClassParameters = {link='pythonParameters'}, pythonClassParameters = 'pythonParameters',
pythonDecorator = {link='PreProc' }, pythonDecorator = 'PreProc' ,
pythonDottedName = {link='Identifier' }, pythonDottedName = 'Identifier' ,
pythonError = {link='Error' }, pythonError = 'Error' ,
pythonException = {link='Exception' }, pythonException = 'Exception' ,
pythonInclude = {link='Include' }, pythonInclude = 'Include' ,
pythonIndentError = {link='pythonError' }, pythonIndentError = 'pythonError' ,
pythonLambdaExpr = {link='pythonOperator' }, pythonLambdaExpr = 'pythonOperator' ,
pythonOperator = {link='Operator' }, pythonOperator = 'Operator' ,
pythonParam = {link='Identifier' }, pythonParam = 'Identifier' ,
pythonParameters = {link='Delimiter' }, pythonParameters = 'Delimiter' ,
pythonSelf = {link='Statement' }, pythonSelf = 'Statement' ,
pythonSpaceError = {link='pythonError' }, pythonSpaceError = 'pythonError' ,
pythonStatement = {link='Statement' }, pythonStatement = 'Statement' ,
--[[ 4.3.21. Ruby ]] --[[ 4.3.21. Ruby ]]
rubyClass = {link='Structure'}, rubyClass = 'Structure',
rubyDefine = {link='Define' }, rubyDefine = 'Define' ,
rubyInterpolationDelimiter = {link='Delimiter'}, rubyInterpolationDelimiter = 'Delimiter',
--[[ 4.3.22. Rust ]] --[[ 4.3.22. Rust ]]
rustKeyword = {link='Keyword' }, rustKeyword = 'Keyword' ,
rustModPath = {link='Include' }, rustModPath = 'Include' ,
rustScopeDecl = {link='Delimiter' }, rustScopeDecl = 'Delimiter' ,
rustTrait = {link='StorageClass'}, rustTrait = 'StorageClass',
--[[ 4.3.23. Scala ]] --[[ 4.3.23. Scala ]]
scalaKeyword = {link='Keyword' }, scalaKeyword = 'Keyword' ,
scalaNameDefinition = {link='Identifier'}, scalaNameDefinition = 'Identifier',
--[[ 4.3.24. shell ]] --[[ 4.3.24. shell ]]
shFunctionKey = {link='Function' }, shFunctionKey = 'Function' ,
shLoop = {link='Repeat' }, shLoop = 'Repeat' ,
shSet = {link='Statement'}, shSet = 'Statement',
shTestOpr = {link='Debug' }, shTestOpr = 'Debug' ,
--[[ 4.3.25. Solidity ]] --[[ 4.3.25. Solidity ]]
solBuiltinType = {link='Type' }, solBuiltinType = 'Type' ,
solContract = {link='Typedef' }, solContract = 'Typedef' ,
solContractName = {link='Function'}, solContractName = 'Function',
--[[ 4.3.26. TOML ]] --[[ 4.3.26. TOML ]]
tomlComment = {link='Comment' }, tomlComment = 'Comment' ,
tomlKey = {link='Label' }, tomlKey = 'Label' ,
tomlTable = {link='StorageClass'}, tomlTable = 'StorageClass',
--[[ 4.3.27. VimScript ]] --[[ 4.3.27. VimScript ]]
vimCommand = {link = 'Keyword' }, helpSpecial = 'Special',
vimFuncKey = {link = 'Function' }, vimFgBgAttrib = 'Constant',
vimGroup = {link = 'Type' }, vimHiCterm = 'Label',
vimHiGroup = {link = 'Typedef' }, vimHiCtermFgBg = 'vimHiCterm',
vimIsCommand = {link = 'vimCommand'}, vimHiGroup = 'Typedef',
vimLet = {link = 'Operator' }, vimHiGui = 'vimHiCterm',
vimMap = {link = 'vimCommand'}, vimHiGuiFgBg = 'vimHiGui',
vimHiKeyList = 'Operator',
vimOption = 'Define',
vimSetEqual = 'Operator',
--[[ 4.3.28. XML ]] --[[ 4.3.28. XML ]]
xmlAttrib = {link='Label' }, xmlAttrib = 'Label' ,
xmlEndTag = {link='Exception'}, xmlEndTag = 'Exception',
xmlEqual = {link='Operator' }, xmlEqual = 'Operator' ,
xmlTag = {link='Delimiter'}, xmlTag = 'Delimiter',
xmlTagName = {link='Define' }, xmlTagName = 'Define' ,
--[[ 4.3.29 Haskell ]] --[[ 4.3.29 Haskell ]]
haskellType = {link='Type' }, haskellType = 'Type' ,
haskellIdentifier = {link='Identifier' }, haskellIdentifier = 'Identifier',
haskellOperators = {link='Operator' }, haskellOperators = 'Operator' ,
haskellWhere = {link='Keyword' }, haskellWhere = 'Keyword' ,
haskellDelimiter = {link='Delimiter' }, haskellDelimiter = 'Delimiter' ,
haskellImportKeywords = {link='Include' }, haskellImportKeywords = 'Include' ,
haskellStatement = {link='Statement' }, haskellStatement = 'Statement' ,
--[[ 4.3.30 Lua ]] --[[ 4.3.30 Lua ]]
luaBraces = 'Structure', luaBraces = 'Structure',
@ -440,8 +452,8 @@ local highlight_groups = {
missing. missing.
]] ]]
--[[ 4.4.1. ALE ]] --[[ 4.4.1. ALE ]]
ALEErrorSign = {link='ErrorMsg' }, ALEErrorSign = 'ErrorMsg' ,
ALEWarningSign = {link='WarningMsg'}, ALEWarningSign = 'WarningMsg',
--[[ 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' }},
@ -454,16 +466,16 @@ local highlight_groups = {
CocWarningSign = {link='ALEWarningSign' }, CocWarningSign = {link='ALEWarningSign' },
--[[ 4.4.2. vim-jumpmotion / vim-easymotion ]] --[[ 4.4.2. vim-jumpmotion / vim-easymotion ]]
EasyMotion = {link = 'IncSearch' }, EasyMotion = 'IncSearch' ,
JumpMotion = {link = 'EasyMotion'}, JumpMotion = 'EasyMotion',
--[[ 4.4.3. vim-markdown ]] --[[ 4.4.3. vim-markdown ]]
htmlH1 = {link='markdownH1'}, htmlH1 = 'markdownH1',
htmlH2 = {link='markdownH2'}, htmlH2 = 'markdownH2',
htmlH3 = {link='markdownH3'}, htmlH3 = 'markdownH3',
htmlH4 = {link='markdownH4'}, htmlH4 = 'markdownH4',
htmlH5 = {link='markdownH5'}, htmlH5 = 'markdownH5',
htmlH6 = {link='markdownH6'}, htmlH6 = 'markdownH6',
--[[ 4.4.4. vim-gitgutter / vim-signify ]] --[[ 4.4.4. vim-gitgutter / vim-signify ]]
GitGutterAdd = {bg=NONE, fg=green, style=NONE}, GitGutterAdd = {bg=NONE, fg=green, style=NONE},
@ -471,38 +483,47 @@ local highlight_groups = {
GitGutterDelete = {bg=NONE, fg=red, style=NONE}, GitGutterDelete = {bg=NONE, fg=red, style=NONE},
GitGutterChangeDelete = {bg=NONE, fg=orange, style=NONE}, GitGutterChangeDelete = {bg=NONE, fg=orange, style=NONE},
SignifySignAdd = {link='GitGutterAdd' }, SignifySignAdd = 'GitGutterAdd' ,
SignifySignChange = {link='GitGutterChange' }, SignifySignChange = 'GitGutterChange' ,
SignifySignDelete = {link='GitGutterDelete' }, SignifySignDelete = 'GitGutterDelete' ,
SignifySignChangeDelete = {link='GitGutterChangeDelete'}, SignifySignChangeDelete = 'GitGutterChangeDelete',
--[[ 4.4.5. vim-indent-guides ]] --[[ 4.4.5. vim-indent-guides ]]
IndentGuidesOdd = {bg=darkgrey, fg=NONE, style=NONE}, IndentGuidesOdd = {bg=darkgrey, fg=NONE, style=NONE},
IndentGuidesEven = {bg=grey, fg=NONE, style=NONE}, IndentGuidesEven = {bg=grey, fg=NONE, style=NONE},
--[[ 4.4.7. NERDTree ]] --[[ 4.4.7. NERDTree ]]
NERDTreeCWD = {link='Label' }, NERDTreeCWD = 'Label' ,
NERDTreeUp = {link='Operator' }, NERDTreeUp = 'Operator' ,
NERDTreeDir = {link='Directory' }, NERDTreeDir = 'Directory' ,
NERDTreeDirSlash = {link='Delimiter' }, NERDTreeDirSlash = 'Delimiter' ,
NERDTreeOpenable = {link='NERDTreeDir' }, NERDTreeOpenable = 'NERDTreeDir' ,
NERDTreeClosable = {link='NERDTreeOpenable'}, NERDTreeClosable = 'NERDTreeOpenable',
NERDTreeExecFile = {link='Function' }, NERDTreeExecFile = 'Function' ,
NERDTreeLinkTarget = {link='Tag' }, NERDTreeLinkTarget = 'Tag' ,
--[[ 4.4.8 SearchLight ]] --[[ 4.4.8. nvim-treesitter ]]
TSConstBuiltin = 'Constant',
TSConstructor = 'Typedef',
TSFuncBuiltin = 'Function',
TSStringEscape = 'Character',
TSStringRegex = 'SpecialChar',
TSURI = 'Tag',
TSVariableBuiltin = 'Identifier',
--[[ 4.4.9 SearchLight ]]
SearchLight = {bg=black, fg=orange, style={'bold', 'italic', 'underline'}}, SearchLight = {bg=black, fg=orange, style={'bold', 'italic', 'underline'}},
--[[ 4.4.9 Sneak ]] --[[ 4.4.10 Sneak ]]
Sneak = {bg=red, fg=black, style='bold' }, Sneak = {bg=red, fg=black, style='bold' },
SneakScope = {bg=black, fg=orange, style={'bold', 'underline'}}, SneakScope = {bg=black, fg=orange, style={'bold', 'underline'}},
--[[ 4.4.10 Which key ]] --[[ 4.4.11 Which key ]]
WhichKey = {link='Function' }, WhichKey = 'Function' ,
WhichKeySeperator = {link='DiffAdded' }, WhichKeySeperator = 'DiffAdded',
WhichKeyGroup = {link='Keyword' }, WhichKeyGroup = 'Keyword' ,
WhichKeyDesc = {bg=black, fg=orange, style=NONE }, WhichKeyDesc = {bg=black, fg=orange, style=NONE },
WhichKeyFloating = {link='Pmenu' }, WhichKeyFloating = 'Pmenu' ,
} }
-- We do not care about terminals which do not support 256 colors -- We do not care about terminals which do not support 256 colors

View file

@ -4,9 +4,6 @@ local vim = vim
-- Clear the highlighting. -- Clear the highlighting.
vim.cmd('hi clear') vim.cmd('hi clear')
-- Set the background to dark.
vim.o.background = 'dark'
-- Disable automatic coloring for the IndentGuides plugin. -- Disable automatic coloring for the IndentGuides plugin.
vim.g.indent_guides_auto_colors = 0 vim.g.indent_guides_auto_colors = 0
@ -14,51 +11,77 @@ vim.g.indent_guides_auto_colors = 0
if vim.fn.exists('syntax_on') then vim.cmd('syntax reset') end if vim.fn.exists('syntax_on') then vim.cmd('syntax reset') end
-- Determine which set of colors to use. -- Determine which set of colors to use.
local use_hex_and_256 = string.find(vim.fn.expand('$TERM'), '256') local using_hex_or_256 = tonumber(vim.o.t_Co) >= 256
or vim.g.t_Co >= 256 or vim.o.termguicolors
or vim.fn.has('gui_running') or vim.fn.has('gui_running')
or string.find(vim.fn.expand('$TERM'), '256')
-- If we aren't using the hex and 256 colorset, then set the &t_Co variable to 16. -- If we aren't using the hex and 256 colorset, then set the &t_Co variable to 16.
if not use_hex_and_256 then vim.g.t_Co = 16 end if not using_hex_or_256 then vim.o.t_Co = 16 end
-- These are constants for the indexes in the colors that were defined before. -- These are constants for the indexes in the colors that were defined before.
local BIT_16 = 3 local PALETTE_ANSI = 3
local BIT_256 = 2 local PALETTE_256 = 2
local HEX = 1 local PALETTE_HEX = 1
local NONE = "NONE"
-- Get the color value of a color variable, or "NONE" as a default. -- Get the color value of a color variable, or "NONE" as a default.
local function get(color, index) local function get(color, index) -- {{{ †
if type(color) == 'table' and color[index] then if type(color) == 'table' and color[index] then
return color[index] return color[index]
elseif type(color) == 'string' then elseif type(color) == 'string' then
return color return color
else else
return "NONE" return NONE
end end
end end --}}} ‡
-- Add the 'blend' parameter to some highlight command, if there is one.
local function blend(command, attributes) -- {{{ †
if attributes.blend then -- There is a value for the `highlight-blend` field.
command[#command + 1] = ' blend='..attributes.blend
end
end --}}} ‡
--[[ If using hex and 256-bit colors, then populate the gui* and cterm* args. --[[ If using hex and 256-bit colors, then populate the gui* and cterm* args.
If using 16-bit colors, just populate the cterm* args. ]] If using 16-bit colors, just populate the cterm* args. ]]
local colorize = use_hex_and_256 and function(command, attributes) command[#command + 1] = local colorize = using_hex_or_256 and function(command, attributes) -- {{{ †
' ctermbg='..get(attributes.bg, BIT_256) command[#command + 1] =
..' ctermfg='..get(attributes.fg, BIT_256) ' ctermbg='..get(attributes.bg, PALETTE_256)
..' guibg='..get(attributes.bg, HEX) ..' ctermfg='..get(attributes.fg, PALETTE_256)
..' guifg='..get(attributes.fg, HEX) ..' guibg='..get(attributes.bg, PALETTE_HEX)
end or function(command, attributes) command[#command + 1] = ..' guifg='..get(attributes.fg, PALETTE_HEX)
' ctermbg='..get(attributes.bg, BIT_16) blend(command, attributes)
..' ctermfg='..get(attributes.fg, BIT_16) end or function(command, attributes)
end command[#command + 1] =
' ctermbg='..get(attributes.bg, PALETTE_ANSI)
..' ctermfg='..get(attributes.fg, PALETTE_ANSI)
blend(command, attributes)
end --}}} ‡
-- This function appends `selected_attributes` to the end of `highlight_cmd`. -- This function appends `selected_attributes` to the end of `highlight_cmd`.
local stylize = use_hex_and_256 and function(command, attributes) local stylize = using_hex_or_256 and function(command, style, color) -- {{{ †
command[#command + 1] = ' cterm='..attributes..' gui='..attributes command[#command + 1] = ' cterm='..style..' gui='..style
end or function(command, attributes)
command[#command + 1] = ' cterm='..attributes if color then -- There is an undercurl color.
end command[#command + 1] = ' guisp='..get(color, PALETTE_HEX)
end
end or function(command, style)
command[#command + 1] = ' cterm='..style
end --}}} ‡
-- Generate a `:highlight` command from a group and some attributes. -- Generate a `:highlight` command from a group and some attributes.
local function highlight(highlight_group, attributes) -- {{{ † local function highlight(highlight_group, attributes) -- {{{ †
-- The base highlight command
local highlight_cmd = {'hi! ', highlight_group} local highlight_cmd = {'hi! ', highlight_group}
-- Take care of special instructions for certain background colors.
if attributes[vim.o.background] then
attributes.__index = attributes
attributes = setmetatable(attributes[vim.o.background], attributes)
end
-- Determine if there is a highlight link, and if so, assign it.
local link = (type(attributes) == 'string' and attributes) local link = (type(attributes) == 'string' and attributes)
or attributes.link or attributes.link
@ -66,18 +89,14 @@ local function highlight(highlight_group, attributes) -- {{{ †
highlight_cmd[3] = highlight_cmd[2]..' ' highlight_cmd[3] = highlight_cmd[2]..' '
highlight_cmd[2] = 'link ' highlight_cmd[2] = 'link '
highlight_cmd[4] = link highlight_cmd[4] = link
else -- the `highlight_group` is uniquely defined. else -- The `highlight_group` is uniquely defined.
colorize(highlight_cmd, attributes) colorize(highlight_cmd, attributes)
local style = attributes.style local style = attributes.style or NONE
if type(style) == 'table' then if type(style) == 'table' then
-- Concat all of the entries together with a comma between before styling. -- Concat all of the entries together with a comma between before styling.
stylize(highlight_cmd, table.concat(style, ',')) stylize(highlight_cmd, table.concat(style, ','), style.color)
else -- The style is just a single entry.
if style.color then -- there won't is a color for undercurl.
highlight_cmd[#highlight_cmd + 1] = ' guisp='..get(style.color, HEX)
end
else -- just style the single entry.
stylize(highlight_cmd, style) stylize(highlight_cmd, style)
end end
end end
@ -95,7 +114,7 @@ return function(Normal, highlights, terminal_ansi_colors)
end end
-- Set the terminal colors. -- Set the terminal colors.
for index, color in ipairs(terminal_ansi_colors) do if using_hex_or_256 then for index, color in ipairs(terminal_ansi_colors) do
vim.g['terminal_color_'..index] = color[HEX] or color[BIT_256] or color[BIT_16] vim.g['terminal_color_'..index] = vim.o.termguicolors and color[PALETTE_HEX] or color[PALETTE_256]
end end end
end end