feat: add toggleterm
This commit is contained in:
parent
c341636729
commit
9c8ed18e9e
@ -30,3 +30,15 @@ nnoremap("<leader>G", ":tab G<CR>")
|
||||
nnoremap("<leader>ff", "<Cmd>Telescope find_files theme=dropdown<CR>")
|
||||
nnoremap("<leader>fb", "<Cmd>Telescope buffers theme=dropdown<CR>")
|
||||
nnoremap("<leader>fg", "<Cmd>Telescope git_files theme=dropdown<CR>")
|
||||
|
||||
-- terminal
|
||||
function _G.set_terminal_keymaps()
|
||||
local opts = {noremap = true}
|
||||
vim.api.nvim_buf_set_keymap(0, 't', '<esc>', [[<C-\><C-n>]], opts)
|
||||
vim.api.nvim_buf_set_keymap(0, 't', '<C-h>', [[<C-\><C-n><C-W>h]], opts)
|
||||
vim.api.nvim_buf_set_keymap(0, 't', '<C-j>', [[<C-\><C-n><C-W>j]], opts)
|
||||
vim.api.nvim_buf_set_keymap(0, 't', '<C-k>', [[<C-\><C-n><C-W>k]], opts)
|
||||
vim.api.nvim_buf_set_keymap(0, 't', '<C-l>', [[<C-\><C-n><C-W>l]], opts)
|
||||
end
|
||||
|
||||
vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()')
|
||||
|
@ -119,6 +119,20 @@ return require('packer').startup(function(use)
|
||||
config = function() require('plugins.telescope') end,
|
||||
})
|
||||
|
||||
-- markdown preview
|
||||
use({'iamcco/markdown-preview.nvim'})
|
||||
|
||||
-- terminal
|
||||
use({
|
||||
"akinsho/nvim-toggleterm.lua",
|
||||
config = function()
|
||||
require("toggleterm").setup({
|
||||
size = 32,
|
||||
open_mapping = [[<F4>]],
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
if packer_bootstrap then
|
||||
require('packer').sync()
|
||||
end
|
||||
|
Reference in New Issue
Block a user