From 4d5a82ae2288f673371da72fab782ca2a0dfaf2c Mon Sep 17 00:00:00 2001 From: servostar Date: Fri, 8 Dec 2023 11:42:09 +0100 Subject: [PATCH] added aerial and various quality of live improvements --- lua/plugins/aerial.lua | 43 +++++++++++++++++++++++++++++++++ lua/plugins/gitsigns.lua | 8 +++--- lua/plugins/lualine.lua | 8 +++--- lua/plugins/neo-tree.lua | 13 ++++++++-- lua/plugins/statuscol.lua | 12 ++++----- lua/plugins/symbols-outline.lua | 11 --------- lua/plugins/todo-comments.lua | 18 ++++++++------ lua/plugins/tokyonight.lua | 4 +-- 8 files changed, 81 insertions(+), 36 deletions(-) create mode 100644 lua/plugins/aerial.lua delete mode 100644 lua/plugins/symbols-outline.lua diff --git a/lua/plugins/aerial.lua b/lua/plugins/aerial.lua new file mode 100644 index 0000000..e81bb8b --- /dev/null +++ b/lua/plugins/aerial.lua @@ -0,0 +1,43 @@ +return { + { + "stevearc/aerial.nvim", + opts = { + backends = { + "treesitter", + "lsp", + "markdown", + "man", + }, + layout = { + default_direction = "prefer_right", + placement = "edge", + resize_to_content = true, + preserve_equality = true, + }, + -- Disable aerial on files with this many lines + disable_max_lines = 10000, + -- Disable aerial on files this size or larger (in bytes) + disable_max_size = 2000000, -- Default 2MB + filter_kind = false, + highlight_on_hover = true, + nerd_font = "auto", + update_events = "TextChanged,InsertLeave", + show_guides = true, + autojump = true, + guides = { + -- When the child item has a sibling below it + mid_item = "│ ", + -- When the child item is the last in the list + last_item = "└ ", + -- When there are nested child guides to the right + nested_top = "│ ", + -- Raw indentation + whitespace = " ", + }, + lsp = { + diagnostics_trigger_update = true, + update_when_errors = true, + }, + } + } +} diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index b0f345a..298cb55 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -3,12 +3,12 @@ return { "lewis6991/gitsigns.nvim", opts = { signs = { - add = { text = "▎" }, - change = { text = "" }, + add = { text = "│" }, + change = { text = "┆" }, delete = { text = "" }, topdelete = { text = "" }, - changedelete = { text = "▎" }, - untracked = { text = "▎" }, + changedelete = { text = "│" }, + untracked = { text = "│" }, }, signcolumn = true, preview_config = { diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 8a68ed6..0500bb5 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -9,7 +9,7 @@ return { icons_enabled = true, globalstatus = true, section_separators = { left = '', right = '' }, - component_separators = { left = '', right = '' }, + component_separators = { left = ' ', right = ' ' }, disabled_filetypes = { statusline = { 'help', @@ -61,9 +61,9 @@ return { { 'diff', symbols = { - added = icons.git.added, - modified = icons.git.modified, - removed = icons.git.removed + added = '+', + modified = '~', + removed = '-', }, colored = true, on_click = function(_, _) diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua index fe28e3d..9937a01 100644 --- a/lua/plugins/neo-tree.lua +++ b/lua/plugins/neo-tree.lua @@ -4,12 +4,13 @@ return { branch = "v3.x", dependencies = { "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended + "nvim-tree/nvim-web-devicons", "MunifTanjim/nui.nvim", -- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information }, opts = { popup_border_style = "rounded", + close_if_last_window = true, enable_git_status = true, enable_diagnostics = true, open_files_do_not_replace_types = { "terminal", "trouble", "qf" }, -- when opening files, do not use windows containing these filetypes or buftypes @@ -47,9 +48,17 @@ return { symbol = "+", highlight = "NeoTreeModified", }, + buffers = { + follow_current_file = { + enabled = true, + }, + }, }, filesystem = { - use_libuv_file_watcher = true + use_libuv_file_watcher = true, + follow_current_file = { + enabled = true + } } } } diff --git a/lua/plugins/statuscol.lua b/lua/plugins/statuscol.lua index 3d1f82d..344874b 100644 --- a/lua/plugins/statuscol.lua +++ b/lua/plugins/statuscol.lua @@ -8,14 +8,9 @@ return { "neo-tree", "toggleterm", "dashboard", - "outline" + "aerial", }, segments = { - -- folds - { - text = { builtin.foldfunc }, - click = "v:lua.ScFa" - }, -- diagnostic signs { sign = { @@ -31,6 +26,11 @@ return { text = { builtin.lnumfunc, " " }, click = "v:lua.ScLa", }, + -- folds + { + text = { builtin.foldfunc }, + click = "v:lua.ScFa" + }, -- git signs { sign = { namespace = { "gitsigns" } }, diff --git a/lua/plugins/symbols-outline.lua b/lua/plugins/symbols-outline.lua deleted file mode 100644 index aa8658a..0000000 --- a/lua/plugins/symbols-outline.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - { - 'simrat39/symbols-outline.nvim', - opts = { - show_guides = true, - autofold_depth = 3, - show_symbol_details = false, - show_numbers = false, - } - } -} diff --git a/lua/plugins/todo-comments.lua b/lua/plugins/todo-comments.lua index 18872d4..b184eef 100644 --- a/lua/plugins/todo-comments.lua +++ b/lua/plugins/todo-comments.lua @@ -1,16 +1,20 @@ return { { "folke/todo-comments.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, cmd = { "TodoTrouble", "TodoTelescope" }, config = true, - -- stylua: ignore keys = { - { "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" }, - { "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" }, - { "xt", "TodoTrouble", desc = "Todo (Trouble)" }, - { "xT", "TodoTrouble keywords=TODO,FIX,FIXME", desc = "Todo/Fix/Fixme (Trouble)" }, - { "st", "TodoTelescope", desc = "Todo" }, - { "sT", "TodoTelescope keywords=TODO,FIX,FIXME", desc = "Todo/Fix/Fixme" }, + { "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" }, + { "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" }, + { "xt", "TodoTrouble", desc = "Todo (Trouble)" }, + { "xT", "TodoTrouble keywords=TODO,FIX,FIXME", desc = "Todo/Fix/Fixme (Trouble)" }, + { "st", "TodoTelescope", desc = "Todo" }, + { "sT", "TodoTelescope keywords=TODO,FIX,FIXME", desc = "Todo/Fix/Fixme" }, }, + ops = { + signs = true, + sign_priority = 8, -- sign priority + } } } diff --git a/lua/plugins/tokyonight.lua b/lua/plugins/tokyonight.lua index 4ff4698..6d79c71 100644 --- a/lua/plugins/tokyonight.lua +++ b/lua/plugins/tokyonight.lua @@ -10,10 +10,10 @@ return { sidebars = "dark", floats = "normal", }, - sidebars = { "qf", "help", "neo-tree", "Outline" }, + sidebars = { "qf", "help", "neo-tree", "aerial" }, }, }, - -- Configure LazyVim to load gruvbox + -- Configure LazyVim to load tokyonight { "LazyVim/LazyVim", opts = {