add toggle term

This commit is contained in:
Freya Murphy 2023-10-10 10:35:46 -04:00
parent cf7475b485
commit 24010810b8
No known key found for this signature in database
GPG key ID: 988032A5638EE799
3 changed files with 6 additions and 0 deletions

View file

@ -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)

View file

@ -74,3 +74,4 @@ vim.diagnostic.config({
require("neodev").setup()
require("nvim-surround").setup()
require("toggleterm").setup()

View file

@ -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')