add code outline navigator to nvim
This commit is contained in:
parent
9d3fa8e910
commit
82a3427e1b
10 changed files with 67 additions and 21 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 =
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ return {
|
|||
},
|
||||
},
|
||||
{ codecompanion_status },
|
||||
{ "aerial" },
|
||||
{
|
||||
"overseer",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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" },
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
return {
|
||||
"williamboman/mason.nvim",
|
||||
cmd = "Mason",
|
||||
keys = { { "<leader>um", "<cmd>Mason<cr>", desc = "Mason" } },
|
||||
build = ":MasonUpdate",
|
||||
opts = {
|
||||
ensure_installed = {},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue