add float term mappings and config

This commit is contained in:
zbirenbaum 2022-04-09 01:32:27 -04:00
parent d7522a940d
commit 4a888ad037
2 changed files with 14 additions and 0 deletions

View File

@ -51,6 +51,14 @@ M.options = {
location = { location = {
horizontal = "rightbelow", horizontal = "rightbelow",
vertical = "rightbelow", vertical = "rightbelow",
float = {
relative = 'editor',
row = 0.3,
col = 0.25,
width = 0.5,
height = 0.4,
border = "single",
}
}, },
}, },
} }
@ -205,6 +213,7 @@ M.mappings = {
-- this just works like toggleterm kinda -- this just works like toggleterm kinda
new_horizontal = "<leader>h", new_horizontal = "<leader>h",
new_vertical = "<leader>v", new_vertical = "<leader>v",
new_float = "<A-i>",
-- spawn new terminals -- spawn new terminals
spawn_horizontal = "<leader>H", spawn_horizontal = "<leader>H",

View File

@ -112,6 +112,11 @@ M.misc = function()
.. tostring(terminal_options.window.vsplit_width) .. tostring(terminal_options.window.vsplit_width)
.. ")<CR>" .. ")<CR>"
) )
map(
{ "n", "t" },
term_maps.new_float,
"<CMD>lua require('nvchad.terminal').new_or_toggle('float')<CR>"
)
-- spawns terminals -- spawns terminals
map( map(