2022-04-27 17:42:28 +02:00
|
|
|
local present, nvterm = pcall(require, "nvterm")
|
|
|
|
|
|
|
|
if not present then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
local options = {
|
|
|
|
terminals = {
|
|
|
|
list = {},
|
|
|
|
type_opts = {
|
|
|
|
float = {
|
|
|
|
relative = "editor",
|
|
|
|
row = 0.3,
|
|
|
|
col = 0.25,
|
|
|
|
width = 0.5,
|
|
|
|
height = 0.4,
|
|
|
|
border = "single",
|
|
|
|
},
|
|
|
|
horizontal = { location = "rightbelow", split_ratio = 0.3 },
|
|
|
|
vertical = { location = "rightbelow", split_ratio = 0.5 },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
behavior = {
|
|
|
|
close_on_exit = true,
|
|
|
|
auto_insert = true,
|
|
|
|
},
|
|
|
|
mappings = {
|
|
|
|
toggle = {
|
|
|
|
float = "<A-i>",
|
|
|
|
horizontal = "<A-h>",
|
|
|
|
vertical = "<A-v>",
|
|
|
|
},
|
|
|
|
new = {
|
|
|
|
horizontal = "<leader>h",
|
|
|
|
vertical = "<leader>v",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
enable_new_mappings = true,
|
|
|
|
}
|
|
|
|
|
2022-05-10 15:43:48 +02:00
|
|
|
options = nvchad.load_override(options, "NvChad/nvterm")
|
2022-04-27 17:42:28 +02:00
|
|
|
|
|
|
|
nvterm.setup(options)
|