add toggle term
This commit is contained in:
parent
cf7475b485
commit
24010810b8
3 changed files with 6 additions and 0 deletions
|
@ -1,6 +1,8 @@
|
|||
local opts = { noremap = true, silent = true }
|
||||
local keymap = vim.keymap.set
|
||||
local builtin = require('telescope.builtin')
|
||||
local Terminal = require('toggleterm.terminal').Terminal
|
||||
local term_float = Terminal:new({ direction = 'float', hidden = 'true' })
|
||||
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
|
@ -17,3 +19,5 @@ keymap('n', '<leader>fh', builtin.help_tags, {})
|
|||
keymap('n', '<leader>u', vim.cmd.UndotreeToggle)
|
||||
keymap('n', '<leader>gs', vim.cmd.Git)
|
||||
keymap('n', '<leader>t', function() require('trouble').toggle() end)
|
||||
keymap('n', '<leader>s', function() term_float:toggle() end)
|
||||
keymap('t', '<leader>s', function() term_float:toggle() end)
|
||||
|
|
|
@ -74,3 +74,4 @@ vim.diagnostic.config({
|
|||
|
||||
require("neodev").setup()
|
||||
require("nvim-surround").setup()
|
||||
require("toggleterm").setup()
|
||||
|
|
|
@ -33,5 +33,6 @@ Plug('j-hui/fidget.nvim', { tag = 'legacy' })
|
|||
Plug('rcarriga/nvim-notify')
|
||||
Plug('folke/trouble.nvim')
|
||||
Plug('kylechui/nvim-surround')
|
||||
Plug('akinsho/toggleterm.nvim', {tag = '*'})
|
||||
|
||||
vim.call('plug#end')
|
||||
|
|
Loading…
Reference in a new issue