plugins.treesitter-context.settings
Options provided to the require('treesitter-context').setup
function.
Type: attribute set of anything
Default:
{ }
Example:
{
line_numbers = true;
max_lines = 0;
min_window_height = 0;
mode = "topline";
multiline_threshold = 20;
separator = "-";
trim_scope = "inner";
zindex = 20;
}
Declared by:
plugins.treesitter-context.settings.enable
Enable this plugin (Can be enabled/disabled later via commands)
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.treesitter-context.settings.line_numbers
Whether to show line numbers.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.treesitter-context.settings.max_lines
How many lines the window should span. 0 means no limit.
Type: null or unsigned integer, meaning >=0, or raw lua code
Default:
null
Plugin default: 0
Declared by:
plugins.treesitter-context.settings.min_window_height
Minimum editor window height to enable context. 0 means no limit.
Type: null or unsigned integer, meaning >=0, or raw lua code
Default:
null
Plugin default: 0
Declared by:
plugins.treesitter-context.settings.mode
Line used to calculate context.
Type: null or one of “cursor”, “topline” or raw lua code
Default:
null
Plugin default: "cursor"
Declared by:
plugins.treesitter-context.settings.multiline_threshold
Maximum number of lines to collapse for a single context line.
Type: null or unsigned integer, meaning >=0, or raw lua code
Default:
null
Plugin default: 20
Declared by:
plugins.treesitter-context.settings.on_attach
The implementation of a lua function which takes an integer buf
as parameter and returns a
boolean.
Return false
to disable attaching.
Type: null or lua function string
Default:
null
Plugin default: "nil"
Declared by:
plugins.treesitter-context.settings.separator
Separator between context and content. Should be a single character string, like “-”. When separator is set, the context will only show up when there are at least 2 lines above cursorline.
Type: null or string
Default:
null
Declared by:
plugins.treesitter-context.settings.trim_scope
Which context lines to discard if max_lines
is exceeded.
Type: null or one of “outer”, “inner” or raw lua code
Default:
null
Plugin default: "outer"
Declared by:
plugins.treesitter-context.settings.zindex
The Z-index of the context window.
Type: null or unsigned integer, meaning >=0, or raw lua code
Default:
null
Plugin default: 20
Declared by: