Files
nvim/lua/rua/plugins/toggleterm.lua
2024-09-12 17:29:04 +08:00

42 lines
1013 B
Lua

return {
{
"akinsho/toggleterm.nvim",
version = "*",
opts = {},
keys = function()
local test = function()
local Terminal = require("toggleterm.terminal").Terminal
local float = Terminal:new({
direction = "float",
float_opts = {
border = "curved",
},
})
float:toggle()
end
return {
{
[[<A-i>]],
test,
desc = "Toggle float terminal",
mode = { "n", "t" },
-- { noremap = true, silent = true },
},
}
end,
-- config = function()
-- local Terminal = require("toggleterm.terminal").Terminal
-- local float = Terminal:new({
-- direction = "float",
-- float_opts = {
-- border = "curved",
-- },
-- })
-- vim.keymap.set({ "n", "t" }, "<A-i>", function()
-- float:toggle()
-- end, { noremap = true, silent = true })
-- end,
-- keys = { "<A-i>" },
},
}