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,5 +1,6 @@
{
"LuaSnip": { "branch": "master", "commit": "ce0a05ab4e2839e1c48d072c5236cce846a387bc" },
"aerial.nvim": { "branch": "master", "commit": "ddd25f57e5205b36bc2e939c486b47818bef9ec3" },
"ccc.nvim": { "branch": "main", "commit": "4fb5abaef2f2e0540fe22d4d74a9841205fff9e4" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
@ -15,12 +16,12 @@
"copilot-lualine": { "branch": "main", "commit": "f40450c3e138766026327e7807877ea860618258" },
"copilot.lua": { "branch": "master", "commit": "f8d8d872bb319f640d5177dad5fbf01f7a16d7d0" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" },
"dressing.nvim": { "branch": "master", "commit": "fc78a3ca96f4db9f8893bb7e2fd9823e0780451b" },
"friendly-snippets": { "branch": "main", "commit": "45a1b96e46efe5fce8af325d4bed45feb9d29d0f" },
"gitsigns.nvim": { "branch": "main", "commit": "e9c4187c3774a46df2d086a66cf3a7e6bea4c432" },
"grapple.nvim": { "branch": "main", "commit": "7aedc261b05a6c030397c4bc26416efbe746ebf1" },
"grapple.nvim": { "branch": "main", "commit": "b41ddfc1c39f87f3d1799b99c2f0f1daa524c5f7" },
"indent-blankline.nvim": { "branch": "master", "commit": "65e20ab94a26d0e14acac5049b8641336819dfc7" },
"lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" },
"lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" },
"lazygit.nvim": { "branch": "main", "commit": "dc56df433bfbf107fee0139e187eb9750878fa84" },
"lualine.nvim": { "branch": "master", "commit": "6a40b530539d2209f7dc0492f3681c8c126647ad" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" },
@ -40,7 +41,7 @@
"nvim-lint": { "branch": "master", "commit": "efc6fc83f0772283e064c53a8f9fb5645bde0bc0" },
"nvim-lspconfig": { "branch": "master", "commit": "216deb2d1b5fbf24398919228208649bbf5cbadf" },
"nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" },
"nvim-treesitter": { "branch": "master", "commit": "7f4ac678770175cdf0d42c015f4a5b6e18b6cb33" },
"nvim-treesitter": { "branch": "master", "commit": "cd2acc803b9e2f9377fb31fbeb993f6e363466f5" },
"nvim-treesitter-context": { "branch": "master", "commit": "f56a1430f21334868a86eb980b12e0af55690e98" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" },
"nvim-ts-autotag": { "branch": "main", "commit": "323a3e16ed603e2e17b26b1c836d1e86c279f726" },
@ -59,8 +60,8 @@
"ts-node-action": { "branch": "master", "commit": "6d3b60754fd87963d70eadaa2f77873b447eac26" },
"typescript-tools.nvim": { "branch": "master", "commit": "5da4d695d66f676eb6ea766b946e86f93baaafe7" },
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
"vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" },
"vim-dadbod-completion": { "branch": "master", "commit": "8c9051c1cfc73fcf5bfe9a84db7097e4f7c0180d" },
"vim-dadbod": { "branch": "master", "commit": "fe5a55e92b2dded7c404006147ef97fb073d8b1b" },
"vim-dadbod-completion": { "branch": "master", "commit": "da0e75c09c27a82aad078d993bb1b2f4afd43427" },
"vim-dadbod-ui": { "branch": "master", "commit": "f74a31e8c6c5a9dccc63450a09d5cd64a9294330" },
"vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" },
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },

View file

@ -31,7 +31,7 @@ opt.scrolloff = 15 -- Lines of context
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
opt.shiftround = true -- Round indent
opt.shiftwidth = 2 -- Size of an indent
opt.shortmess:append({ W = true, I = true, c = true })
-- opt.shortmess:append({ W = true, I = true, c = true }) -- INFO: this control the format of some messages
opt.showmode = false -- Dont show mode since we have a statusline
opt.sidescrolloff = 8 -- Columns of context
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time

View file

@ -34,6 +34,7 @@ return {
},
message = {
view = "mini",
view_search = false,
},
progress = {
view = "mini_left"
@ -139,22 +140,21 @@ return {
"Redirect Cmdline"
},
{
"<leader>unl",
"<leader>um",
function() require("noice").cmd("last") end,
desc =
"Noice Last Message"
"Messages last"
},
{
"<leader>unh",
"<leader>uM",
function() require("noice").cmd("history") end,
desc =
"Noice History"
"Messages all"
},
{ "<leader>una", function() require("noice").cmd("all") end, desc = "Noice All" },
{ "<leader>und", function() require("noice").cmd("dismiss") end, desc = "Dismiss All" },
{ "<leader>uX", function() require("noice").cmd("dismiss") end, desc = "Message dismiss all" },
{
"<c-f>",
function() if not require("noice.lsp").scroll(4) then return "<c-f>" end end,
"<c-d>",
function() if not require("noice.lsp").scroll(4) then return "<c-d>" end end,
silent = true,
expr = true,
desc =
@ -163,8 +163,8 @@ return {
"i", "n", "s" }
},
{
"<c-b>",
function() if not require("noice.lsp").scroll(-4) then return "<c-b>" end end,
"<c-u>",
function() if not require("noice.lsp").scroll(-4) then return "<c-u>" end end,
silent = true,
expr = true,
desc =

View file

@ -6,6 +6,7 @@ return { -- Change colors.none if not using a transparent background
flavour = "macchiato",
transparent_background = true,
integrations = {
aerial = true,
cmp = true,
notify = true,
harpoon = false,

View file

@ -6,7 +6,15 @@ return {
-- Highlight word under cursor
"RRethy/vim-illuminate",
event = { "BufReadPost", "BufNewFile" },
opts = { delay = 200 },
opts = {
delay = 200,
filetypes_denylist = {
'dirbuf',
'dirvish',
'fugitive',
'aerial',
},
},
config = function(_, opts)
require("illuminate").configure(opts)
end,

View file

@ -115,6 +115,7 @@ return {
},
},
{ codecompanion_status },
{ "aerial" },
{
"overseer",
},

View file

@ -50,6 +50,7 @@ return {
-- Enable telescope fzf native, if installed
pcall(telescope.load_extension, "fzf")
pcall(telescope.load_extension, "aerial")
-- Find files
vim.keymap.set(

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 = {},

View file

@ -174,7 +174,8 @@ set -g @popup-id-format '#{b:socket_path}/#{session_name}/#{b:pane_current_path}
# Use this to open specific programs in floating panes
bind C-p run "#{@popup-toggle}"
bind C-o run "#{@popup-toggle} -Ed'#{pane_current_path}' -w90% -h90% --name=tool fzf-tmux-tools-popup"
bind C-g run "#{@popup-toggle} -Ed'#{pane_current_path}' -w90% -h90% --name=lazygit lazygit"
bind C-o run "#{@popup-toggle} -Ed'#{pane_current_path}' -w90% -h90% --name=tool $HOME/Repos/Private/dots/scripts/fzf-tmux-tools-popup"
bind C-w run "#{@popup-toggle} -Ed'#{pane_current_path}' -w90% -h90% --name=wiki fzf-wikis"
bind C-z run "#{@popup-toggle} -Ed'#{pane_current_path}' -w90% -h90% --name=wiki fzf-wikis void"