starter/lua/plugins/toggleterm.lua

27 lines
785 B
Lua
Raw Normal View History

2024-02-18 12:19:39 +08:00
return {
-- amongst your other plugins
2024-09-14 02:39:35 +08:00
-- { "akinsho/toggleterm.nvim", version = "*", config = true },
2024-02-18 12:19:39 +08:00
-- or
2025-02-21 11:13:26 +08:00
{
2025-02-21 12:57:44 +08:00
"akinsho/toggleterm.nvim",
version = "*",
opts = { --[[ things you want to change go here]]
2025-02-21 11:13:26 +08:00
direction = "vertical",
2025-02-21 12:57:44 +08:00
shell = "/opt/homebrew/bin/tmux",
2024-09-14 02:39:35 +08:00
},
config = function()
2025-02-21 12:57:44 +08:00
local toggleterm = require("toggleterm")
toggleterm.setup()
vim.cmd([[
2024-09-14 02:39:35 +08:00
tnoremap <silent><c-t> <Cmd>exe v:count1 . "ToggleTerm"<CR>
" By applying the mappings this way you can pass a count to your
" mapping to open a specific window.
" For example: 2<C-t> will open terminal 2
nnoremap <silent><c-t> <Cmd>exe v:count1 . "ToggleTerm"<CR>
inoremap <silent><c-t> <Esc><Cmd>exe v:count1 . "ToggleTerm"<CR>
2025-02-21 12:57:44 +08:00
]])
end,
},
}