use nvim-navic in lualine instead of filename section (default)

This commit is contained in:
Baipyrus 2024-10-28 17:51:31 +01:00
parent 735b2ed90b
commit 41776a4c5b
2 changed files with 9 additions and 3 deletions

View File

@ -10,6 +10,15 @@ return {
section_separators = { left = '', right = '' },
component_separators = { left = '', right = '' },
},
-- Replace filename section with code context
sections = {
lualine_c = {
{
'navic',
color_correction = 'static',
},
},
},
},
},
}

View File

@ -96,9 +96,6 @@ vim.opt.guicursor = 'n-v-i-c:block-Cursor'
vim.o.laststatus = 3
vim.api.nvim_set_hl(0, 'WinSeparator', { bg = nil })
-- Set winbar to nvim-navic for code context
vim.o.winbar = "%{%v:lua.require'nvim-navic'.get_location()%}"
vim.api.nvim_create_autocmd('UIEnter', {
group = vim.api.nvim_create_augroup('SetGUISettings', { clear = true }),
callback = function()