|
|
|
@ -79,7 +79,7 @@ See my configuration for `galaxyline.nvim` [here](https://gitlab.com/Iron_E/dotf
|
|
|
|
|
local TEAL = '#60afff'
|
|
|
|
|
local TURQOISE = '#2bff99'
|
|
|
|
|
local YELLOW = '#f0df33'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local MODES =
|
|
|
|
|
{ -- {{{
|
|
|
|
|
['c'] = {'COMMAND-LINE', RED},
|
|
|
|
@ -102,40 +102,40 @@ See my configuration for `galaxyline.nvim` [here](https://gitlab.com/Iron_E/dotf
|
|
|
|
|
['V'] = {'VISUAL LINE', BLUE},
|
|
|
|
|
['␖'] = {'VISUAL BLOCK', BLUE},
|
|
|
|
|
['!'] = {'SHELL', YELLOW},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- libmodal
|
|
|
|
|
['BUFFERS'] = TEAL,
|
|
|
|
|
['TABLES'] = ORANGE_LIGHT,
|
|
|
|
|
['TABS'] = TAN,
|
|
|
|
|
} -- }}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local MODE_HL_GROUP = 'LualineViMode'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--[[/* FELINE CONFIG */]]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd('User', {
|
|
|
|
|
callback = function()
|
|
|
|
|
require('lualine').refresh {scope = 'window', place = {'statusline'}}
|
|
|
|
|
end,
|
|
|
|
|
pattern = {'LibmodalModeEnterPre', 'LibmodalModeLeavePost'},
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
require('lualine').setup {sections = {lualine_a = {{
|
|
|
|
|
function() -- auto change color according the vim mode
|
|
|
|
|
local mode_color, mode_name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if vim.g.libmodalActiveModeName then
|
|
|
|
|
mode_name = vim.g.libmodalActiveModeName
|
|
|
|
|
mode_color = MODES[mode_name]
|
|
|
|
|
else
|
|
|
|
|
local current_mode = MODES[vim.api.nvim_get_mode().mode]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mode_name = current_mode[1]
|
|
|
|
|
mode_color = current_mode[2]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_set_hl(0, MODE_HL_GROUP, {fg = mode_color, bold = true})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return mode_name..' '
|
|
|
|
|
end,
|
|
|
|
|
icon = {'▊', align = 'left'},
|
|
|
|
|