From 37f53ea0dc5d51db0e20534a38e084c0561ec839 Mon Sep 17 00:00:00 2001 From: Warren Hood Date: Wed, 12 Apr 2023 20:13:14 +0200 Subject: [PATCH] Add code actions and command search to neovim --- neovim/.config/nvim/lua/warrenhood/keybinds.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/neovim/.config/nvim/lua/warrenhood/keybinds.lua b/neovim/.config/nvim/lua/warrenhood/keybinds.lua index 1b5be3f..85b57f5 100644 --- a/neovim/.config/nvim/lua/warrenhood/keybinds.lua +++ b/neovim/.config/nvim/lua/warrenhood/keybinds.lua @@ -153,3 +153,9 @@ for i=1,#arrows do map('n', arrows[i], function () end) map('i', arrows[i], function () end) end + +-- Code actions with ctrl + . +map('n', '.', function() vim.lsp.buf.code_action({ apply = true}) end, { desc = 'Code action/Quick fix' }) + +-- Show telescope commands fuzzy finder +map('n', '', function() require('telescope.builtin').commands() end, { desc = 'Show commands' })