plugins.toggleterm.settings
Options provided to the require('toggleterm').setup function.
Type: open submodule of attribute set of lua value
Default:
{ }
Example:
{
direction = "float";
float_opts = {
border = "curved";
height = 30;
width = 130;
};
open_mapping = "[[<c-\\>]]";
}
Declared by:
plugins.toggleterm.settings.on_close
Function to run when the terminal closes.
fun(t: Terminal)
Type: null or lua code string
Default:
null
Declared by:
plugins.toggleterm.settings.on_create
Function to run when the terminal is first created.
fun(t: Terminal)
Type: null or lua code string
Default:
null
Declared by:
plugins.toggleterm.settings.on_exit
Function to run when terminal process exits.
fun(t: Terminal, job: number, exit_code: number, name: string)
Type: null or lua code string
Default:
null
Declared by:
plugins.toggleterm.settings.on_open
Function to run when the terminal opens.
fun(t: Terminal)
Type: null or lua code string
Default:
null
Declared by:
plugins.toggleterm.settings.on_stderr
Callback for processing output on stderr.
fun(t: Terminal, job: number, data: string[], name: string)
Type: null or lua code string
Default:
null
Declared by:
plugins.toggleterm.settings.on_stdout
Callback for processing output on stdout.
fun(t: Terminal, job: number, data: string[], name: string)
Type: null or lua code string
Default:
null
Declared by:
plugins.toggleterm.settings.open_mapping
Setting the open_mapping key to use for toggling the terminal(s) will set up mappings for
normal mode.
Type: null or lua code string
Default:
null
Declared by:
plugins.toggleterm.settings.size
Size of the terminal.
size can be a number or a function.
Example:
size = 20
OR
size = \'\'
function(term)
if term.direction == "horizontal" then
return 15
elseif term.direction == "vertical" then
return vim.o.columns * 0.4
end
end
\'\';
Type: null or lua function string or signed integer or floating point number
Default:
null
Plugin default: 12
Declared by: