added aerial and various quality of live improvements

This commit is contained in:
Sven Vogel 2023-12-08 11:42:09 +01:00
parent 72fbadaf70
commit 4d5a82ae22
8 changed files with 81 additions and 36 deletions

43
lua/plugins/aerial.lua Normal file
View File

@ -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,
},
}
}
}

View File

@ -3,12 +3,12 @@ return {
"lewis6991/gitsigns.nvim", "lewis6991/gitsigns.nvim",
opts = { opts = {
signs = { signs = {
add = { text = "" }, add = { text = "" },
change = { text = "" }, change = { text = "" },
delete = { text = "" }, delete = { text = "" },
topdelete = { text = "" }, topdelete = { text = "" },
changedelete = { text = "" }, changedelete = { text = "" },
untracked = { text = "" }, untracked = { text = "" },
}, },
signcolumn = true, signcolumn = true,
preview_config = { preview_config = {

View File

@ -9,7 +9,7 @@ return {
icons_enabled = true, icons_enabled = true,
globalstatus = true, globalstatus = true,
section_separators = { left = '', right = '' }, section_separators = { left = '', right = '' },
component_separators = { left = '', right = '' }, component_separators = { left = ' ', right = ' ' },
disabled_filetypes = { disabled_filetypes = {
statusline = { statusline = {
'help', 'help',
@ -61,9 +61,9 @@ return {
{ {
'diff', 'diff',
symbols = { symbols = {
added = icons.git.added, added = '+',
modified = icons.git.modified, modified = '~',
removed = icons.git.removed removed = '-',
}, },
colored = true, colored = true,
on_click = function(_, _) on_click = function(_, _)

View File

@ -4,12 +4,13 @@ return {
branch = "v3.x", branch = "v3.x",
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended "nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim", "MunifTanjim/nui.nvim",
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information -- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
}, },
opts = { opts = {
popup_border_style = "rounded", popup_border_style = "rounded",
close_if_last_window = true,
enable_git_status = true, enable_git_status = true,
enable_diagnostics = 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 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 = "+", symbol = "+",
highlight = "NeoTreeModified", highlight = "NeoTreeModified",
}, },
buffers = {
follow_current_file = {
enabled = true,
},
},
}, },
filesystem = { filesystem = {
use_libuv_file_watcher = true use_libuv_file_watcher = true,
follow_current_file = {
enabled = true
}
} }
} }
} }

View File

@ -8,14 +8,9 @@ return {
"neo-tree", "neo-tree",
"toggleterm", "toggleterm",
"dashboard", "dashboard",
"outline" "aerial",
}, },
segments = { segments = {
-- folds
{
text = { builtin.foldfunc },
click = "v:lua.ScFa"
},
-- diagnostic signs -- diagnostic signs
{ {
sign = { sign = {
@ -31,6 +26,11 @@ return {
text = { builtin.lnumfunc, " " }, text = { builtin.lnumfunc, " " },
click = "v:lua.ScLa", click = "v:lua.ScLa",
}, },
-- folds
{
text = { builtin.foldfunc },
click = "v:lua.ScFa"
},
-- git signs -- git signs
{ {
sign = { namespace = { "gitsigns" } }, sign = { namespace = { "gitsigns" } },

View File

@ -1,11 +0,0 @@
return {
{
'simrat39/symbols-outline.nvim',
opts = {
show_guides = true,
autofold_depth = 3,
show_symbol_details = false,
show_numbers = false,
}
}
}

View File

@ -1,9 +1,9 @@
return { return {
{ {
"folke/todo-comments.nvim", "folke/todo-comments.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
cmd = { "TodoTrouble", "TodoTelescope" }, cmd = { "TodoTrouble", "TodoTelescope" },
config = true, config = true,
-- stylua: ignore
keys = { keys = {
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" }, { "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" }, { "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
@ -12,5 +12,9 @@ return {
{ "<leader>st", "<cmd>TodoTelescope<cr>", desc = "Todo" }, { "<leader>st", "<cmd>TodoTelescope<cr>", desc = "Todo" },
{ "<leader>sT", "<cmd>TodoTelescope keywords=TODO,FIX,FIXME<cr>", desc = "Todo/Fix/Fixme" }, { "<leader>sT", "<cmd>TodoTelescope keywords=TODO,FIX,FIXME<cr>", desc = "Todo/Fix/Fixme" },
}, },
ops = {
signs = true,
sign_priority = 8, -- sign priority
}
} }
} }

View File

@ -10,10 +10,10 @@ return {
sidebars = "dark", sidebars = "dark",
floats = "normal", 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", "LazyVim/LazyVim",
opts = { opts = {