nixos/config/nvim/lua/config_plugins/config_aerial.lua
2023-01-27 22:12:42 +00:00

28 lines
1 KiB
Lua

local aerial = require('aerial')
aerial.setup {
backends = {
["_"] = { "lsp", "treesitter", "markdown", "man" },
python = { "treesitter" },
},
layout = {
default_direction = "right",
placement = "edge",
},
attach_mode = "global",
highlight_mode = "none",
lazy_load = false,
on_attach = function(bufnr)
-- Toggle the aerial window with <leader>a
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>a', '<cmd>AerialToggle!<CR>', {})
-- Jump forwards/backwards with '{' and '}'
vim.api.nvim_buf_set_keymap(bufnr, 'n', '{', '<cmd>AerialPrev<CR>', {})
vim.api.nvim_buf_set_keymap(bufnr, 'n', '}', '<cmd>AerialNext<CR>', {})
-- Jump up the tree with '[[' or ']]'
vim.api.nvim_buf_set_keymap(bufnr, 'n', '[[', '<cmd>AerialPrevUp<CR>', {})
vim.api.nvim_buf_set_keymap(bufnr, 'n', ']]', '<cmd>AerialNextUp<CR>', {})
end,
open_automatic = false,
close_automatic_events = { "unsupported" },
show_guides = true,
}