From d880893e2155ee1703a6ab71c23a2c2eef132604 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 22 Mar 2021 21:16:54 +0100 Subject: [PATCH] nvim: Fix mapping incompabitility Fixed keymap incompabitility introduced with switching to lspsaga code actions. It used `gc` for normal/visual mode code actions, which I already make use of for toggling comments in code. Switched to `ca` instead. --- nvim/.config/nvim/lua/nvim-lspconfig/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvim/.config/nvim/lua/nvim-lspconfig/init.lua b/nvim/.config/nvim/lua/nvim-lspconfig/init.lua index af466db..229b323 100644 --- a/nvim/.config/nvim/lua/nvim-lspconfig/init.lua +++ b/nvim/.config/nvim/lua/nvim-lspconfig/init.lua @@ -8,9 +8,9 @@ local on_attach = function(_, _) {noremap = true, silent = true}) vim.api.nvim_set_keymap("n", "gd", "lua require'lspsaga.provider'.preview_definition()", {noremap = true, silent = true}) - vim.api.nvim_set_keymap("n", "gc", "lua require 'lspsaga.codeaction'.code_action()", + vim.api.nvim_set_keymap("n", "ca", "lua require 'lspsaga.codeaction'.code_action()", {noremap = true, silent = true}) - vim.api.nvim_set_keymap("v", "gc", "'<,'>lua require 'lspsaga.codeaction'.range_code_action()", + vim.api.nvim_set_keymap("v", "ca", "'<,'>lua require 'lspsaga.codeaction'.range_code_action()", {noremap = true, silent = true}) vim.api.nvim_set_keymap("n", "K", "lua require('lspsaga.hover').render_hover_doc()", {noremap = true, silent = true})