Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

plugins.aerial.settings

Options provided to the require('aerial').setup function.

Type: open submodule of attribute set of lua value

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.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)
    -- return "MyHighlight" .. symbol.kind
  end
''

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.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 of aerial.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 language
    • symbols?: specific to the lsp backend
    • syntax_tree?: specific to the treesitter backend

Type: null or raw lua code

Default: null

Plugin default:

lib.nixvim.mkRaw ''
  function(bufnr, items, ctx)
    return items
  end
''

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 type aerial.Symbol

  • ctx: a record containing the following fields:

    • backend_name: treesitter, lsp, man…
    • lang: info about the language
    • symbols?: specific to the lsp backend
    • symbol?: specific to the lsp backend
    • syntax_tree?: specific to the treesitter backend
    • match?: 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)
    return true
  end
''

Declared by: