-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtoggleterm.lua
More file actions
31 lines (31 loc) · 1.05 KB
/
Copy pathtoggleterm.lua
File metadata and controls
31 lines (31 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
return {
"akinsho/toggleterm.nvim",
cmd = "ToggleTerm",
keys = {
{ "<leader>ft", "<cmd>ToggleTerm<cr>", desc = "terminal" },
{ "<C-t>", "<cmd>ToggleTerm<cr>", desc = "terminal" },
},
---@module "toggleterm"
---@type ToggleTermConfig
---@diagnostic disable-next-line: missing-fields
opts = {
size = function(term)
if term.direction == "horizontal" then
return 15
elseif term.direction == "vertical" then
return vim.o.columns * 0.4
end
end,
open_mapping = [[<c-t>]],
hide_numbers = true, -- hide the number column in toggleterm buffers
shade_filetypes = {},
shade_terminals = false,
start_in_insert = true,
insert_mappings = true, -- whether or not the open mapping applies in insert mode
terminal_mappings = true, -- whether or not the open mapping applies in the opened terminals
persist_size = true,
direction = "horizontal" or "vertical" or "window" or "float",
close_on_exit = true, -- close the terminal window when the process exits
auto_scroll = false,
},
}