From 41776a4c5bd68a9d253ac653d35408550faa341d Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Mon, 28 Oct 2024 17:51:31 +0100 Subject: [PATCH] use nvim-navic in lualine instead of filename section (default) --- lua/custom/plugins/lualine.lua | 9 +++++++++ lua/options.lua | 3 --- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lua/custom/plugins/lualine.lua b/lua/custom/plugins/lualine.lua index 070430a..7a38ec4 100644 --- a/lua/custom/plugins/lualine.lua +++ b/lua/custom/plugins/lualine.lua @@ -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', + }, + }, + }, }, }, } diff --git a/lua/options.lua b/lua/options.lua index 2dd38a9..a43fa62 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -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()