forked from AstroNvim/AstroNvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaerial.lua
More file actions
56 lines (54 loc) · 1.73 KB
/
Copy pathaerial.lua
File metadata and controls
56 lines (54 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
return {
"stevearc/aerial.nvim",
event = "User AstroFile",
specs = {
{
"AstroNvim/astrocore",
opts = function(_, opts)
local maps = opts.mappings
maps.n["<Leader>lS"] = { function() require("aerial").toggle() end, desc = "Symbols outline" }
end,
},
},
opts = function()
local opts = {
attach_mode = "global",
backends = { "lsp", "treesitter", "markdown", "man" },
layout = { min_width = 28 },
show_guides = true,
filter_kind = false,
guides = {
mid_item = "├ ",
last_item = "└ ",
nested_top = "│ ",
whitespace = " ",
},
keymaps = {
["[y"] = "actions.prev",
["]y"] = "actions.next",
["[Y"] = "actions.prev_up",
["]Y"] = "actions.next_up",
["{"] = false,
["}"] = false,
["[["] = false,
["]]"] = false,
},
on_attach = function(bufnr)
local astrocore = require "astrocore"
astrocore.set_mappings({
n = {
["]y"] = { function() require("aerial").next(vim.v.count1) end, desc = "Next symbol" },
["[y"] = { function() require("aerial").prev(vim.v.count1) end, desc = "Previous symbol" },
["]Y"] = { function() require("aerial").next_up(vim.v.count1) end, desc = "Next symbol upwards" },
["[Y"] = { function() require("aerial").prev_up(vim.v.count1) end, desc = "Previous symbol upwards" },
},
}, { buffer = bufnr })
end,
}
local large_buf = vim.tbl_get(require("astrocore").config, "features", "large_buf")
if large_buf then
opts.disable_max_lines, opts.disable_max_size = large_buf.lines, large_buf.size
end
return opts
end,
}