Adjust color settings; use get() consistently
This commit is contained in:
parent
a38985d366
commit
a582a162e9
|
@ -3,7 +3,10 @@
|
|||
-- Clear the highlighting.
|
||||
vim.cmd('hi clear')
|
||||
|
||||
-- Set the background to dark.
|
||||
vim.o.background = 'dark'
|
||||
|
||||
-- Disable automatic coloring for the IndentGuides plugin.
|
||||
vim.g.indent_guides_auto_colors = 0
|
||||
|
||||
-- If the syntax has been enabled, reset it.
|
||||
|
@ -12,7 +15,7 @@ if vim.fn.exists('syntax_on') then vim.cmd('syntax reset') end
|
|||
-- Determine which set of colors to use.
|
||||
local use_hex_and_256 = string.find(vim.fn.expand('$TERM'), '256')
|
||||
or vim.g.t_Co >= 256
|
||||
or vim.fn.has("gui_running")
|
||||
or vim.fn.has('gui_running')
|
||||
|
||||
-- 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
|
||||
|
@ -102,6 +105,6 @@ return function(name, Normal, highlights, terminal_ansi_colors)
|
|||
|
||||
-- Set the terminal colors.
|
||||
for index, color in ipairs(terminal_ansi_colors) do
|
||||
vim.g['terminal_color_' .. index] = color[HEX]
|
||||
vim.g['terminal_color_' .. index] = get(color, HEX)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -202,7 +202,7 @@ local highlights = {
|
|||
Float = {link='Number' },
|
||||
|
||||
--[[ 4.1.2. Identifiers]]
|
||||
Identifier = {bg=NONE, fg=white, style=NONE},
|
||||
Identifier = {bg=NONE, fg=FG, style=NONE},
|
||||
Function = {bg=NONE, fg=purple, style=NONE},
|
||||
|
||||
--[[ 4.1.3. Syntax]]
|
||||
|
@ -232,7 +232,7 @@ local highlights = {
|
|||
SpecialChar = {link='Character' },
|
||||
SpecialKey = {link='Character' },
|
||||
Tag = {link='Underlined' },
|
||||
Delimiter = {link='Normal' },
|
||||
Delimiter = {bg=NONE, fg=white, style=NONE },
|
||||
SpecialComment = {bg=NONE, fg=gray, style={'bold', 'nocombine'}},
|
||||
Debug = {link='WarningMsg' },
|
||||
|
||||
|
|
Loading…
Reference in New Issue