Skip to content

Commit cc8967f

Browse files
committed
Add aerial config for outlining
1 parent 49985de commit cc8967f

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
return {
2+
-- Code outline and navigation
3+
{
4+
"stevearc/aerial.nvim",
5+
opts = {
6+
backends = { "treesitter", "lsp", "markdown", "man" },
7+
layout = {
8+
width = 30,
9+
default_direction = "right",
10+
placement = "window",
11+
},
12+
show_guides = true,
13+
filter_kind = false,
14+
15+
-- File type specific configurations
16+
markdown = {
17+
update_when = "insert_leave",
18+
},
19+
20+
-- Enable for specific file types
21+
attach_mode = "window",
22+
23+
-- Treesitter symbol kinds to show
24+
treesitter = {
25+
update_delay = 300,
26+
},
27+
},
28+
keys = {
29+
{ "<leader>o", "<cmd>AerialToggle<cr>", desc = "Toggle outline" },
30+
{ "<leader>O", "<cmd>AerialNavToggle<cr>", desc = "Outline navigation" },
31+
},
32+
config = function(_, opts)
33+
require("aerial").setup(opts)
34+
35+
-- Auto-open aerial for supported file types (optional)
36+
vim.api.nvim_create_autocmd("FileType", {
37+
pattern = { "markdown" },
38+
callback = function()
39+
require("aerial").open()
40+
end,
41+
})
42+
end,
43+
},
44+
}

0 commit comments

Comments
 (0)