add code outline navigator to nvim

This commit is contained in:
Alexander Navarro 2024-11-21 12:30:12 -03:00
parent 9d3fa8e910
commit 82a3427e1b
10 changed files with 67 additions and 21 deletions

View file

@ -1,4 +1,4 @@
return {
return { {
-- LSP Configuration & Plugins
"neovim/nvim-lspconfig",
event = { "BufReadPost", "BufNewFile", "BufWritePre" },
@ -216,4 +216,38 @@ return {
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
end
end,
},
{
'stevearc/aerial.nvim',
-- Optional dependencies
dependencies = {
"nvim-treesitter/nvim-treesitter",
"nvim-tree/nvim-web-devicons"
},
opts = {
close_on_select = false,
show_guides = true,
autojump = true,
highlight_on_hover = true,
layout = {
default_direction = "float",
},
float = {
relative = "editor",
},
nav = {
preview = true,
keymaps = {
["q"] = "actions.close",
},
},
},
keys = {
{ "<leader>lt", function() require("aerial").toggle() end, desc = "Open syntax tree" },
{ "<leader>lT", function() require("aerial").nav_toggle() end, desc = "Open syntax tree navigation" },
{ "<leader>fl", "<CMD>Telescope aerial<CR>", desc = "Find in syntax tree" },
}
}
}

View file

@ -1,7 +1,6 @@
return {
"williamboman/mason.nvim",
cmd = "Mason",
keys = { { "<leader>um", "<cmd>Mason<cr>", desc = "Mason" } },
build = ":MasonUpdate",
opts = {
ensure_installed = {},