vim: improve color declarations in lualine config
This commit is contained in:
parent
0945175fe5
commit
d8ba015ccd
1 changed files with 59 additions and 60 deletions
|
@ -1,31 +1,30 @@
|
|||
local colors = {}
|
||||
if vim.opt.termguicolors:get() then
|
||||
colors = {
|
||||
base03 = '#002b36', yellow = '#b58900',
|
||||
base02 = '#073642', orange = '#cb4b16',
|
||||
base01 = '#586e75', red = '#dc322f',
|
||||
base00 = '#657b83', magenta = '#d33682',
|
||||
base0 = '#839496', violet = '#6c71c4',
|
||||
base1 = '#93a1a1', blue = '#268bd2',
|
||||
base2 = '#eee8d5', cyan = '#2aa198',
|
||||
base3 = '#fdf6e3', green = '#859900',
|
||||
}
|
||||
else
|
||||
colors = {
|
||||
base03 = 8, yellow = 3,
|
||||
base02 = 0, orange = 9,
|
||||
base01 = 10, red = 1,
|
||||
base00 = 11, magenta = 5,
|
||||
base0 = 12, violet = 13,
|
||||
base1 = 14, blue = 4,
|
||||
base2 = 7, cyan = 6,
|
||||
base3 = 15, green = 2,
|
||||
}
|
||||
local gui = vim.opt.termguicolors:get()
|
||||
|
||||
local function color(tbl)
|
||||
if gui then return tbl.gui end
|
||||
return tbl.index
|
||||
end
|
||||
|
||||
base03 = color { index = 8, gui = '#002b36' }
|
||||
base02 = color { index = 0, gui = '#073642' }
|
||||
base01 = color { index = 10, gui = '#586e75' }
|
||||
base00 = color { index = 11, gui = '#657b83' }
|
||||
base0 = color { index = 12, gui = '#839496' }
|
||||
base1 = color { index = 14, gui = '#93a1a1' }
|
||||
base2 = color { index = 7, gui = '#eee8d5' }
|
||||
base3 = color { index = 15, gui = '#fdf6e3' }
|
||||
yellow = color { index = 3, gui = '#b58900' }
|
||||
orange = color { index = 9, gui = '#cb4b16' }
|
||||
red = color { index = 1, gui = '#dc322f' }
|
||||
magenta = color { index = 5, gui = '#d33682' }
|
||||
violet = color { index = 13, gui = '#6c71c4' }
|
||||
blue = color { index = 4, gui = '#268bd2' }
|
||||
cyan = color { index = 6, gui = '#2aa198' }
|
||||
green = color { index = 2, gui = '#859900' }
|
||||
|
||||
local paste = {
|
||||
function() return 'P' end,
|
||||
color = { fg = colors.base3, bg = colors.yellow, gui = 'bold' },
|
||||
color = { fg = base3, bg = yellow, gui = 'bold' },
|
||||
cond = function() return vim.opt.paste:get() end
|
||||
}
|
||||
|
||||
|
@ -43,7 +42,7 @@ local encoding = function ()
|
|||
end
|
||||
|
||||
-- let padding when using icons leaves too much space
|
||||
local fileformat = { 'fileformat', padding = { left = 0, right = 1} }
|
||||
local fileformat = { 'fileformat', padding = { left = 0, right = 1}}
|
||||
|
||||
local progress = '%3l/%L|%-2v' -- line / total |column
|
||||
|
||||
|
@ -54,17 +53,17 @@ require('lualine').setup {
|
|||
section_separators = { left = '', right = '' },
|
||||
theme = {
|
||||
normal = {
|
||||
a = { fg = colors.base03, bg = colors.blue, gui='bold' },
|
||||
b = { fg = colors.base2, bg = colors.base00 },
|
||||
c = { fg = colors.base1, bg = colors.base02 },
|
||||
a = { fg = base03, bg = blue, gui='bold' },
|
||||
b = { fg = base2, bg = base00 },
|
||||
c = { fg = base1, bg = base02 },
|
||||
},
|
||||
insert = { a = { fg = colors.base03, bg = colors.green, gui = 'bold' } },
|
||||
visual = { a = { fg = colors.base03, bg = colors.magenta, gui = 'bold' } },
|
||||
replace = { a = { fg = colors.base03, bg = colors.red, gui = 'bold' } },
|
||||
insert = { a = { fg = base03, bg = green, gui = 'bold' } },
|
||||
visual = { a = { fg = base03, bg = magenta, gui = 'bold' } },
|
||||
replace = { a = { fg = base03, bg = red, gui = 'bold' } },
|
||||
inactive = {
|
||||
a = { fg = colors.base1, bg = colors.base00 },
|
||||
b = { fg = colors.base0, bg = colors.base01 },
|
||||
c = { fg = colors.base00, bg = colors.base02 },
|
||||
a = { fg = base1, bg = base00 },
|
||||
b = { fg = base0, bg = base01 },
|
||||
c = { fg = base00, bg = base02 },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue