add toggleterm
This commit is contained in:
parent
f4716511b2
commit
a1d27de7b0
|
@ -29,6 +29,7 @@ require('lazy').setup({
|
||||||
require 'plugins/indent-blankline',
|
require 'plugins/indent-blankline',
|
||||||
--require 'plugins/nvim-lint',
|
--require 'plugins/nvim-lint',
|
||||||
require 'plugins/nvim-dap',
|
require 'plugins/nvim-dap',
|
||||||
|
require 'plugins/toggleterm',
|
||||||
}, {
|
}, {
|
||||||
ui = {
|
ui = {
|
||||||
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
||||||
|
|
|
@ -14,6 +14,7 @@ return {
|
||||||
'mason',
|
'mason',
|
||||||
'neo-tree',
|
'neo-tree',
|
||||||
'nvim-dap-ui',
|
'nvim-dap-ui',
|
||||||
|
'toggleterm',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
|
|
22
lua/plugins/toggleterm.lua
Normal file
22
lua/plugins/toggleterm.lua
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
'akinsho/toggleterm.nvim',
|
||||||
|
config = function()
|
||||||
|
require('toggleterm').setup {
|
||||||
|
-- config
|
||||||
|
}
|
||||||
|
|
||||||
|
local toggleterm = require 'toggleterm'
|
||||||
|
vim.keymap.set('n', '<leader>tt', toggleterm.toggle, { desc = '[T]oggle Terminal' })
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('TermOpen', {
|
||||||
|
desc = 'Set toggleterm keymaps on terminal open',
|
||||||
|
group = vim.api.nvim_create_augroup('kickstart-termopen-setkeymaps', { clear = true }),
|
||||||
|
callback = function()
|
||||||
|
local opts = { buffer = 0 }
|
||||||
|
vim.keymap.set('t', '<esc>', [[<C-\><C-n>]], opts) -- <Esc> to exit out of "Terminal" mode
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
Loading…
Reference in a new issue