From 5bcd6af235f12f61f3f0e97ae597c51958d94485 Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Mon, 12 Jun 2023 12:31:15 -0700 Subject: [PATCH] Fix navic in lualine --- neovim/lua/plugins/lualine.lua | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/neovim/lua/plugins/lualine.lua b/neovim/lua/plugins/lualine.lua index 753bd08..eb4f37b 100644 --- a/neovim/lua/plugins/lualine.lua +++ b/neovim/lua/plugins/lualine.lua @@ -48,6 +48,7 @@ function M.config_lualine(theme_name) -- gps / navic local code_loc = {} + utils.try_require("nvim-gps", function(gps) gps.setup({ icons = { @@ -60,9 +61,22 @@ function M.config_lualine(theme_name) }) code_loc = { gps.get_location, cond = gps.is_available } end) + utils.try_require("nvim-navic", function(navic) - navic.setup() - code_loc = { navic.get_location, cond = navic.is_available } + navic.setup({ + icons = { + Class = "(c)", + Constant = "(Const)", + Constructor = "cst", + Function = "(f)", + Method = "(m)", + Package = "(p)", + Property = "(pr)", + Struct = "(s)", + Variable = "(v)", + }, + }) + code_loc = { "navic" } end) local diagnostic_plugin = "nvim_diagnostic"