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