add vertical toggleterm

This commit is contained in:
xfy
2025-04-15 21:23:24 +08:00
parent ffb3777720
commit d5a47509ea

View File

@ -22,6 +22,13 @@ return {
start_in_insert = true, start_in_insert = true,
display_name = "RUA", display_name = "RUA",
}) })
local vertical = Terminal:new({
direction = "vertical",
persist_mode = false,
auto_scroll = true,
start_in_insert = true,
display_name = "RUA",
})
local lazygit = Terminal:new({ local lazygit = Terminal:new({
direction = "float", direction = "float",
auto_scroll = true, auto_scroll = true,
@ -41,6 +48,9 @@ return {
map({ "n", "t" }, "<A-u>", function() map({ "n", "t" }, "<A-u>", function()
horizontal:toggle() horizontal:toggle()
end, { noremap = true, silent = true }) end, { noremap = true, silent = true })
map({ "n", "t" }, "<A-o>", function()
vertical:toggle()
end, { noremap = true, silent = true })
map({ "n", "t" }, "<C-/>", function() map({ "n", "t" }, "<C-/>", function()
horizontal:toggle() horizontal:toggle()
end) end)
@ -48,6 +58,6 @@ return {
lazygit:toggle() lazygit:toggle()
end, { noremap = true, silent = true }) end, { noremap = true, silent = true })
end, end,
keys = { "<A-i>", "<A-u>", "<C-/>", "<leader>gl" }, keys = { "<A-i>", "<A-u>", "<A-o>", "<C-/>", "<leader>gl" },
}, },
} }