Added a better terminal system as neovims terminal sucks
This commit is contained in:
parent
5bace57f39
commit
3189db8f98
3 changed files with 18 additions and 0 deletions
|
|
@ -5,3 +5,4 @@ require("core.plugin_config.telescope")
|
|||
require("core.plugin_config.treesitter")
|
||||
require("core.plugin_config.lsp_config")
|
||||
require("core.plugin_config.completions")
|
||||
require("core.plugin_config.terminal")
|
||||
|
|
|
|||
16
lua/core/plugin_config/terminal.lua
Normal file
16
lua/core/plugin_config/terminal.lua
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
require("toggleterm").setup({
|
||||
hide_numbers = true,
|
||||
start_in_insert = true,
|
||||
shell = vim.o.shell,
|
||||
})
|
||||
|
||||
-- Get out of terminal!
|
||||
function _G.set_terminal_keymaps()
|
||||
local opts = {buffer = 0}
|
||||
vim.keymap.set('t', '<esc>', [[<C-\><C-n>]], opts)
|
||||
vim.keymap.set('t', '<C-w>', [[<C-\><C-n><C-w>]], opts)
|
||||
end
|
||||
vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()')
|
||||
|
||||
-- Open terminal keymap
|
||||
vim.keymap.set('n', '<leader>t', ":ToggleTerm<CR>",{noremap = true, silent = true})
|
||||
|
|
@ -22,6 +22,7 @@ local plugins = {
|
|||
event = "InsertEnter",
|
||||
opts = {} -- this is equalent to setup({}) function
|
||||
},
|
||||
'akinsho/toggleterm.nvim',
|
||||
-- fzf
|
||||
{
|
||||
'nvim-telescope/telescope.nvim',
|
||||
|
|
|
|||
Loading…
Reference in a new issue