forked from Snoweuph/Dotfiles
21 lines
659 B
Lua
21 lines
659 B
Lua
return {
|
|
"caenrique/buffer-term.nvim",
|
|
config = function()
|
|
local buffer_term = require("buffer-term")
|
|
buffer_term.setup()
|
|
|
|
-- Keybindings --
|
|
vim.keymap.set({ "n", "t" }, "<F6>", buffer_term.toggle_last, { desc = "Toggle Last Terminal" })
|
|
|
|
local function getToggleTerminalFunction(terminalNumber)
|
|
return function()
|
|
buffer_term.toggle(terminalNumber)
|
|
end
|
|
end
|
|
|
|
for i = 0, 9 do
|
|
local key = "<F6>" .. i
|
|
vim.keymap.set({ "n", "t" }, key, getToggleTerminalFunction(tostring(i)), { desc = "Toggle Terminal " .. i })
|
|
end
|
|
end,
|
|
}
|