From ccbf466c555bd614cacd1b32934ccf617fe82359 Mon Sep 17 00:00:00 2001 From: Vladan Popovic Date: Wed, 20 Mar 2024 03:12:22 +0100 Subject: [PATCH] replace nvim-code-action-menu with actions-preview --- lua/lsp.lua | 1 - lua/plugins/init.lua | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/lsp.lua b/lua/lsp.lua index 507044b..a9ea942 100644 --- a/lua/lsp.lua +++ b/lua/lsp.lua @@ -8,7 +8,6 @@ local on_attach = function(client, bufnr) utils.map("n", "", "lua vim.lsp.buf.rename()()") utils.map("n", "[d", "lua vim.diagnostic.goto_prev()") utils.map("n", "]d", "lua vim.diagnostic.goto_next()") - utils.map("n", "ca", "lua vim.lsp.buf.code_action()") utils.map("n", "wl", "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))") utils.map("n", "wa", "lua vim.lsp.buf.add_workspace_folder()") utils.map("n", "wr", "lua vim.lsp.buf.remove_workspace_folder()") diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 7211e0c..a8ecbd4 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -53,7 +53,11 @@ require('packer').startup(function() -- LSP and related use { 'neovim/nvim-lspconfig' } - use { 'weilbith/nvim-code-action-menu', cmd = 'CodeActionMenu' } + use { 'aznhe21/actions-preview.nvim', + config = function() + vim.keymap.set("n", "ca", require("actions-preview").code_actions) + end, + } use { 'folke/trouble.nvim' } -- lsp diagnostics -- Languages that need a plugin to extend default lsp