update nvcodeline

This commit is contained in:
Chris 2020-10-31 16:41:14 -04:00
parent 00832c88c4
commit 5030b0bf89

View file

@ -9,13 +9,13 @@ local colors = {
yellow = '#fabd2f', yellow = '#fabd2f',
cyan = '#008080', cyan = '#008080',
darkblue = '#081633', darkblue = '#081633',
green = '#afd700', green = '#608B4E',
orange = '#FF8800', orange = '#FF8800',
purple = '#5d4d7a', purple = '#5d4d7a',
magenta = '#d16d9e', magenta = '#d16d9e',
grey = '#c0c0c0', grey = '#c0c0c0',
blue = '#0087d7', blue = '#569CD6',
red = '#ec5f67' red = '#D16969'
} }
local buffer_not_empty = function() local buffer_not_empty = function()
@ -25,44 +25,66 @@ local buffer_not_empty = function()
return false return false
end end
gls.left[1] = { -- gls.left[1] = {
FirstElement = { -- FirstElement = {
-- provider = function() return '▋' end, -- -- provider = function() return '▋' end,
provider = function() return ' ' end, -- provider = function() return ' ' end,
highlight = {colors.bg,colors.purple} -- highlight = {colors.bg,colors.bg}
}, -- },
} -- }
-- gls.left[2] = {
-- ViMode = {
-- provider = function()
-- local alias = {n = 'NORMAL',i = 'INSERT',c= 'COMMAND',V= 'VISUAL', [''] = 'VISUAL'}
-- return alias[vim.fn.mode()]
-- end,
-- separator = ' ',
-- separator_highlight = {colors.yellow,function()
-- if not buffer_not_empty() then
-- return colors.purple
-- end
-- return colors.purple
-- end},
-- highlight = {colors.grey,colors.purple,'bold'},
-- },
-- }
gls.left[2] = { gls.left[2] = {
ViMode = { ViMode = {
provider = function() provider = function()
local alias = {n = 'NORMAL',i = 'INSERT',c= 'COMMAND',V= 'VISUAL', [''] = 'VISUAL'} -- auto change color according the vim mode
return alias[vim.fn.mode()] local mode_color = {n = colors.purple,
i = colors.green,
v=colors.blue,
[''] = colors.blue,
V=colors.blue,
c = colors.purple,
no = colors.magenta,
s = colors.orange,
S=colors.orange,
[''] = colors.orange,
ic = colors.yellow,
R = colors.red,
Rv = colors.red,
cv = colors.red,
ce=colors.red,
r = colors.cyan,
rm = colors.cyan,
['r?'] = colors.cyan,
['!'] = colors.red,
t = colors.red}
vim.api.nvim_command('hi GalaxyViMode guibg='..mode_color[vim.fn.mode()])
return ' NV Code '
end, end,
separator = ' ', separator = ' ',
separator_highlight = {colors.yellow,function() separator_highlight = {colors.yellow,function()
if not buffer_not_empty() then if not buffer_not_empty() then
return colors.purple return colors.bg
end end
return colors.purple return colors.bg
end}, end},
highlight = {colors.grey,colors.purple,'bold'}, highlight = {colors.grey,colors.bg,'bold'},
}, },
} }
-- gls.left[2] = {
-- ViMode = {
-- provider = function()
-- -- auto change color according the vim mode
-- local mode_color = {n = colors.magenta, i = colors.green,v=colors.blue,[''] = colors.blue,V=colors.blue,
-- c = colors.red,no = colors.magenta,s = colors.orange,S=colors.orange,
-- [''] = colors.orange,ic = colors.yellow,R = colors.purple,Rv = colors.purple,
-- cv = colors.red,ce=colors.red, r = colors.cyan,rm = colors.cyan, ['r?'] = colors.cyan,
-- ['!'] = colors.red,t = colors.red}
-- vim.api.nvim_command('hi GalaxyViMode guifg='..mode_color[vim.fn.mode()])
-- return ' '
-- end,
-- highlight = {colors.red,colors.line_bg,'bold'},
-- },
-- }
-- gls.left[3] ={ -- gls.left[3] ={
-- FileIcon = { -- FileIcon = {
-- separator = ' ', -- separator = ' ',
@ -166,24 +188,24 @@ gls.right[1]= {
FileFormat = { FileFormat = {
provider = 'FileFormat', provider = 'FileFormat',
separator = ' ', separator = ' ',
separator_highlight = {colors.bg,colors.purple}, separator_highlight = {colors.bg,colors.bg},
highlight = {colors.grey,colors.purple}, highlight = {colors.grey,colors.bg},
} }
} }
gls.right[2] = { gls.right[2] = {
LineInfo = { LineInfo = {
provider = 'LineColumn', provider = 'LineColumn',
separator = ' | ', separator = ' | ',
separator_highlight = {colors.darkblue,colors.purple}, separator_highlight = {colors.darkblue,colors.bg},
highlight = {colors.grey,colors.purple}, highlight = {colors.grey,colors.bg},
}, },
} }
gls.right[3] = { gls.right[3] = {
PerCent = { PerCent = {
provider = 'LinePercent', provider = 'LinePercent',
separator = ' ', separator = ' |',
separator_highlight = {colors.darkblue,colors.purple}, separator_highlight = {colors.darkblue,colors.bg},
highlight = {colors.grey,colors.darkblue}, highlight = {colors.grey,colors.bg},
} }
} }
gls.right[4] = { gls.right[4] = {