starter/lua/plugins/toggleterm.lua

25 lines
733 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
2024-09-14 02:39:35 +08:00
{'akinsho/toggleterm.nvim',
version = "*",
opts = {--[[ things you want to change go here]]
direction = "horiztonal",
},
config = function()
local toggleterm = require('toggleterm')
toggleterm.setup()
vim.cmd [[
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>
]]
end,
}
}