From 1e21edefbcbb683334ea415872195547efc64fdb Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Tue, 1 Nov 2022 17:23:08 +0000 Subject: [PATCH] Add Trouble keymaps, remove LazyGit and Ranger keymaps --- lua/config_plugins/config_toggleterm.lua | 15 --------------- lua/keymaps.lua | 10 ++++++++++ 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/lua/config_plugins/config_toggleterm.lua b/lua/config_plugins/config_toggleterm.lua index 8d00a412..95cac699 100644 --- a/lua/config_plugins/config_toggleterm.lua +++ b/lua/config_plugins/config_toggleterm.lua @@ -14,18 +14,3 @@ function _G.set_terminal_keymaps() end vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()') - -local Terminal = require('toggleterm.terminal').Terminal -local lazygit = Terminal:new({ cmd = "lazygit", count = 99, direction = 'float' }) -local ranger = Terminal:new({ cmd = "ranger", count = 100, direction = 'float' }) - -function _lazygit_toggle() - lazygit:toggle() -end - -function _ranger_toggle() - ranger:toggle() -end - -vim.api.nvim_set_keymap("n", "tg", "lua _lazygit_toggle()", {noremap = true, silent = true}) -vim.api.nvim_set_keymap("n", "tr", "lua _ranger_toggle()", {noremap = true, silent = true}) diff --git a/lua/keymaps.lua b/lua/keymaps.lua index 2d62697a..8ef7abc6 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -41,3 +41,13 @@ nmap('hw', 'HopWord') -- Nvim-tree nmap('nt', 'NvimTreeToggle') nmap('nf', 'NvimTreeFindFile') + +-- Trouble +nmap('tq', 'TroubleToggle quickfix') +nmap('tl', 'TroubleToggle loclist') +nmap('tr', 'TroubleToggle lsp_references') +nmap('td', 'TroubleToggle lsp_definitions') +nmap('tt', 'TroubleToggle lsp_type_definitions') +nmap('ti', 'TroubleToggle lsp_implementations') +nmap('tdd', 'TroubleToggle document_diagnostics') +nmap('twd', 'TroubleToggle workspace_diagnostics')