plugins.toggleterm.settings
Options provided to the require('toggleterm').setup
function.
Type: attribute set of anything
Default:
{ }
Example:
{
direction = "float";
float_opts = {
border = "curved";
height = 30;
width = 130;
};
open_mapping = "[[<c->]]";
}
Declared by:
plugins.toggleterm.settings.auto_scroll
Automatically scroll to the bottom on terminal output.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.toggleterm.settings.autochdir
When neovim changes it current directory the terminal will change it’s own when next it’s opened.
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.toggleterm.settings.close_on_exit
Close the terminal window when the process exits.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.toggleterm.settings.direction
The direction the terminal should be opened in.
Type: null or one of “vertical”, “horizontal”, “tab”, “float” or raw lua code
Default:
null
Plugin default: "horizontal"
Declared by:
plugins.toggleterm.settings.hide_numbers
Hide the number column in toggleterm buffers.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.toggleterm.settings.highlights
Highlights which map a highlight group name to an attrs of it’s values.
Type: null or (attribute set of ((attribute set) or raw lua code))
Default:
null
Plugin default:
{
FloatBorder = {
link = "Normal";
};
NormalFloat = {
link = "Normal";
};
StatusLine = {
gui = "NONE";
};
StatusLineNC = {
cterm = "italic";
gui = "NONE";
};
}
Declared by:
plugins.toggleterm.settings.insert_mappings
Whether or not the open mapping applies in insert mode.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
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.persist_mode
If set to true (default) the previous terminal mode will be remembered.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.toggleterm.settings.persist_size
Whether the terminal size should persist.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.toggleterm.settings.shade_filetypes
Shade filetypes.
Type: null or (list of (string or raw lua code))
Default:
null
Plugin default: [ ]
Declared by:
plugins.toggleterm.settings.shade_terminals
NOTE: This option takes priority over highlights specified so if you specify Normal
highlights you should set this to false
.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.toggleterm.settings.shading_factor
The percentage by which to lighten terminal background.
default: -30 (gets multiplied by -3 if background is light).
Type: null or signed integer
Default:
null
Declared by:
plugins.toggleterm.settings.shell
Change the default shell.
Type: null or string or raw lua code
Default:
null
Plugin default:
{
__raw = "vim.o.shell";
}
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:
plugins.toggleterm.settings.start_in_insert
Whether to start toggleterm in insert mode.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.toggleterm.settings.terminal_mappings
Whether or not the open mapping applies in the opened terminals.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by: