From 1ed617ae84c168fe9f2e6b9e004f56912c39fbd6 Mon Sep 17 00:00:00 2001 From: Charles Danesi Date: Sun, 8 Dec 2024 20:25:41 -0500 Subject: [PATCH] style: use nvim-navic for breadcrumbs, disable treesitter-context --- .config/nvim/lua/plugins/lualine.lua | 21 ++++++---- .config/nvim/lua/plugins/navic.lua | 51 +++++++++++++++++++++++++ .config/nvim/lua/plugins/ts-context.lua | 3 +- 3 files changed, 67 insertions(+), 8 deletions(-) create mode 100644 .config/nvim/lua/plugins/navic.lua diff --git a/.config/nvim/lua/plugins/lualine.lua b/.config/nvim/lua/plugins/lualine.lua index 2b708fc..bc60ceb 100644 --- a/.config/nvim/lua/plugins/lualine.lua +++ b/.config/nvim/lua/plugins/lualine.lua @@ -99,16 +99,16 @@ return { section_separators = { left = '', right = '' }, -- old separators:   disabled_filetypes = { statusline = { 'alpha', 'dashboard', 'Outline', 'NvimTree' }, - winbar = {}, + winbar = { 'alpha', 'dashboard', 'Outline', 'NvimTree' }, }, ignore_focus = {}, always_divide_middle = true, always_show_tabline = true, globalstatus = false, refresh = { - statusline = 1000, - tabline = 1000, - winbar = 1000, + statusline = 100, + tabline = 100, + winbar = 100, }, }, sections = { @@ -129,7 +129,7 @@ return { { 'filetype', colored = true, - icon_only = true, + icon_only = false, cond = conditions.min_statusline_width(90), separator = '', }, @@ -264,9 +264,16 @@ return { lualine_z = {}, }, tabline = {}, - winbar = {}, + winbar = { + lualine_a = {}, + lualine_b = { { 'navic', color_correction = 'nil' } }, + lualine_c = {}, + lualine_x = {}, + lualine_y = {}, + lualine_z = {}, + }, inactive_winbar = {}, extensions = { 'nvim-tree', 'lazy', 'trouble', 'quickfix', 'fzf', 'mason' }, }) end, -} \ No newline at end of file +} diff --git a/.config/nvim/lua/plugins/navic.lua b/.config/nvim/lua/plugins/navic.lua new file mode 100644 index 0000000..ab17c51 --- /dev/null +++ b/.config/nvim/lua/plugins/navic.lua @@ -0,0 +1,51 @@ +return { + 'SmiteshP/nvim-navic', + dependencies = { + 'neovim/nvim-lspconfig', + }, + event = 'VeryLazy', + opts = { + icons = { + File = '󰈙 ', + Module = ' ', + Namespace = '󰌗 ', + Package = ' ', + Class = '󰌗 ', + Method = '󰆧 ', + Property = ' ', + Field = ' ', + Constructor = ' ', + Enum = '󰕘', + Interface = '󰕘', + Function = '󰊕 ', + Variable = '󰆧 ', + Constant = '󰏿 ', + String = '󰀬 ', + Number = '󰎠 ', + Boolean = '◩ ', + Array = '󰅪 ', + Object = '󰅩 ', + Key = '󰌋 ', + Null = '󰟢 ', + EnumMember = ' ', + Struct = '󰌗 ', + Event = ' ', + Operator = '󰆕 ', + TypeParameter = '󰊄 ', + }, + lsp = { + auto_attach = true, + preference = nil, + }, + highlight = false, + separator = ' > ', + depth_limit = 0, + depth_limit_indicator = '..', + safe_output = true, + lazy_update_context = false, + click = true, + format_text = function(text) + return text + end, + }, +} diff --git a/.config/nvim/lua/plugins/ts-context.lua b/.config/nvim/lua/plugins/ts-context.lua index 71a3d3c..aef3050 100644 --- a/.config/nvim/lua/plugins/ts-context.lua +++ b/.config/nvim/lua/plugins/ts-context.lua @@ -1,5 +1,6 @@ return { 'nvim-treesitter/nvim-treesitter-context', + enabled = false, dependencies = { 'nvim-treesitter/nvim-treesitter', }, @@ -11,4 +12,4 @@ return { max_lines = 3, -- separator = '', }, -} \ No newline at end of file +}