plugins.aerial.settings
Options provided to the require('aerial').setup
function.
Type: attribute set of anything
Default:
{ }
Example:
{
attach_mode = "global";
backends = [
"treesitter"
"lsp"
"markdown"
"man"
];
disable_max_lines = 5000;
highlight_on_hover = true;
ignore = {
filetypes = [
"gomod"
];
};
}
Declared by:
plugins.aerial.settings.attach_mode
Determines how the aerial window decides which buffer to display symbols for
"window"
: aerial window will display symbols for the buffer in the window from which it was opened"global"
: aerial window will display symbols for the current window
Type: null or one of “window”, “global” or raw lua code
Default:
null
Plugin default: "window"
Declared by:
plugins.aerial.settings.autojump
Jump to symbol in source window when the cursor moves.
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.aerial.settings.backends
Priority list of preferred backends for aerial. This can be a filetype map (see :help aerial-filetype-map)
Type: null or raw lua code or list of string or attribute set of list of string
Default:
null
Plugin default:
[
"treesitter"
"lsp"
"markdown"
"asciidoc"
"man"
]
Declared by:
plugins.aerial.settings.close_automatic_events
List of enum values that configure when to auto-close the aerial window
"unfocus"
: close aerial when you leave the original source window"switch_buffer"
: close aerial when you change buffers in the source window"unsupported"
: close aerial when attaching to a buffer that has no symbol source
Type: null or (list of (one of “unfocus”, “switch_buffer”, “unsupported” or raw lua code))
Default:
null
Plugin default: [ ]
Declared by:
plugins.aerial.settings.close_on_select
When true
, aerial will automatically close after jumping to a symbol
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.aerial.settings.disable_max_lines
Disable aerial on files with this many lines.
Type: null or unsigned integer, meaning >=0, or raw lua code
Default:
null
Plugin default: 10000
Declared by:
plugins.aerial.settings.disable_max_size
Disable aerial on files this size or larger (in bytes). Default 2MB.
Type: null or unsigned integer, meaning >=0, or raw lua code
Default:
null
Plugin default: 2000000
Declared by:
plugins.aerial.settings.filter_kind
A list of all symbols to display.
Set to false to display all symbols.
This can be a filetype map (see :help aerial-filetype-map
).
To see all available values, see :help SymbolKind
.
Type: null or raw lua code or (list of string) or value false (singular enum) or attribute set of ((list of string) or value false (singular enum))
Default:
null
Plugin default:
[
"Class"
"Constructor"
"Enum"
"Function"
"Interface"
"Module"
"Method"
"Struct"
]
Declared by:
plugins.aerial.settings.get_highlight
Set this function to override the highlight groups for certain symbols.
Type: null or raw lua code
Default:
null
Plugin default: lib.nixvim.mkRaw "function(symbol, is_icon, is_collapsed)\n -- return \"MyHighlight\" .. symbol.kind\nend\n"
Declared by:
plugins.aerial.settings.guides
Customize the characters used when show_guides = true
.
Type: null or (attribute set of (string or raw lua code))
Default:
null
Plugin default:
{
last_item = "└─";
mid_item = "├─";
nested_top = "│ ";
whitespace = " ";
}
Declared by:
plugins.aerial.settings.highlight_closest
Highlight the closest symbol if the cursor is not exactly on one.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.aerial.settings.highlight_mode
Determines line highlighting mode when multiple splits are visible.
"split_width"
: Each open window will have its cursor location marked in the aerial buffer. Each line will only be partially highlighted to indicate which window is at that location."full_width"
: Each open window will have its cursor location marked as a full-width highlight in the aerial buffer."last"
: Only the most-recently focused window will have its location marked in the aerial buffer."none"
: Do not show the cursor locations in the aerial window.
Type: null or one of “split_width”, “full_width”, “last”, “none” or raw lua code
Default:
null
Plugin default: "split_width"
Declared by:
plugins.aerial.settings.highlight_on_hover
Highlight the symbol in the source buffer when cursor is in the aerial win.
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.aerial.settings.highlight_on_jump
When jumping to a symbol, highlight the line for this many ms. Set to false to disable.
Type: null or unsigned integer, meaning >=0, or value false (singular enum)
Default:
null
Plugin default: 300
Declared by:
plugins.aerial.settings.icons
Define symbol icons.
You can also specify "<Symbol>Collapsed"
to change the icon when the tree is collapsed at
that symbol, or "Collapsed"
to specify a default collapsed icon.
The default icon set is determined by the "nerd_font"
option below.
If you have lspkind-nvim installed, it will be the default icon set.
This can be a filetype map (see :help aerial-filetype-map
).
Type: null or raw lua code or list of string or attribute set of list of string
Default:
null
Plugin default: [ ]
Declared by:
plugins.aerial.settings.keymaps
Keymaps in aerial window.
Can be any value that vim.keymap.set
accepts OR a table of keymap options with a
callback
(e.g. { callback.__raw = "function() ... end"; desc = ""; nowait = true; }
).
Additionally, if it is a string that matches “actions.<name>”, it will use the mapping at
require("aerial.actions").<name>
.
Set to false
to remove a keymap.
Type: null or (attribute set of (string or attribute set of anything or value false (singular enum) or raw lua code))
Default:
null
Plugin default:
{
"<2-LeftMouse>" = "actions.jump";
"<C-j>" = "actions.down_and_scroll";
"<C-k>" = "actions.up_and_scroll";
"<C-s>" = "actions.jump_split";
"<C-v>" = "actions.jump_vsplit";
"<CR>" = "actions.jump";
"?" = "actions.show_help";
H = "actions.tree_close_recursive";
L = "actions.tree_open_recursive";
O = "actions.tree_toggle_recursive";
"[[" = "actions.prev_up";
"]]" = "actions.next_up";
"g?" = "actions.show_help";
h = "actions.tree_close";
l = "actions.tree_open";
o = "actions.tree_toggle";
p = "actions.scroll";
q = "actions.close";
zA = "actions.tree_toggle_recursive";
zC = "actions.tree_close_recursive";
zM = "actions.tree_close_all";
zO = "actions.tree_open_recursive";
zR = "actions.tree_open_all";
zX = "actions.tree_sync_folds";
za = "actions.tree_toggle";
zc = "actions.tree_close";
zm = "actions.tree_decrease_fold_level";
zo = "actions.tree_open";
zr = "actions.tree_increase_fold_level";
zx = "actions.tree_sync_folds";
"{" = "actions.prev";
"}" = "actions.next";
}
Declared by:
plugins.aerial.settings.lazy_load
When true
, don’t load aerial until a command or function is called.
Defaults to true
, unless on_attach
is provided, then it defaults to false
.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.aerial.settings.link_folds_to_tree
When you fold code with za, zo, or zc, update the aerial tree as well.
Only works when manage_folds = true
.
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.aerial.settings.link_tree_to_folds
Fold code when you open/collapse symbols in the tree.
Only works when manage_folds = true
.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.aerial.settings.manage_folds
Use symbol tree for folding.
Set to true
or false
to enable/disable.
Set to "auto"
to manage folds if your previous foldmethod was ‘manual’
This can be a filetype map (see :help aerial-filetype-map)
Type: null or raw lua code or string or boolean or attribute set of (string or boolean)
Default:
null
Plugin default: false
Declared by:
plugins.aerial.settings.nerd_font
Set default symbol icons to use patched font icons (see https://www.nerdfonts.com/).
"auto"
will set it to true
if nvim-web-devicons or lspkind-nvim is installed.
Type: null or boolean or value “auto” (singular enum)
Default:
null
Plugin default: "auto"
Declared by:
plugins.aerial.settings.on_attach
Call this function when aerial attaches to a buffer.
Type: null or raw lua code
Default:
null
Plugin default: lib.nixvim.mkRaw "function(bufnr) end"
Declared by:
plugins.aerial.settings.on_first_symbols
Call this function when aerial first sets symbols on a buffer.
Type: null or raw lua code
Default:
null
Plugin default: lib.nixvim.mkRaw "function(bufnr) end"
Declared by:
plugins.aerial.settings.open_automatic
Automatically open aerial when entering supported buffers. This can be a function (see :help aerial-open-automatic).
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.aerial.settings.post_add_all_symbols
Invoked after all symbols have been parsed and post-processed, allows to modify the symbol structure before final display.
-
bufnr
: a neovim buffer number -
items
: a collection ofaerial.Symbol
items, organized in a tree, with ‘parent’ and ‘children’ fields -
ctx
: a record containing the following fields:backend_name
: treesitter, lsp, man…lang
: info about the languagesymbols?
: specific to the lsp backendsyntax_tree?
: specific to the treesitter backend
Type: null or raw lua code
Default:
null
Plugin default: lib.nixvim.mkRaw "function(bufnr, items, ctx)\n return items\nend\n"
Declared by:
plugins.aerial.settings.post_jump_cmd
Run this command after jumping to a symbol (false
will disable).
Type: null or value false (singular enum) or string
Default:
null
Plugin default: "normal! zz"
Declared by:
plugins.aerial.settings.post_parse_symbol
Invoked after each symbol is parsed, can be used to modify the parsed item, or to filter
it by returning false
.
Arguments:
-
bufnr
: a neovim buffer number -
item
: of typeaerial.Symbol
-
ctx
: a record containing the following fields:backend_name
: treesitter, lsp, man…lang
: info about the languagesymbols?
: specific to the lsp backendsymbol?
: specific to the lsp backendsyntax_tree?
: specific to the treesitter backendmatch?
: specific to the treesitter backend, TS query match
Type: null or raw lua code
Default:
null
Plugin default: lib.nixvim.mkRaw "function(bufnr, item, ctx)\n return true\nend\n"
Declared by:
plugins.aerial.settings.show_guides
Whether show box drawing characters for the tree hierarchy.
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.aerial.settings.update_events
The autocmds that trigger symbols update (not used for LSP backend).
Type: null or string or raw lua code
Default:
null
Plugin default: "TextChanged,InsertLeave"
Declared by: