From 3d7ae67a45c0b143fa0b2c83ae80c48ddc5ca463 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Fri, 2 Feb 2024 21:53:34 -0600 Subject: [PATCH] feat(nvim): add preview for code actions --- dots/.config/nvim/lua/plugins/configs/lsp.lua | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/dots/.config/nvim/lua/plugins/configs/lsp.lua b/dots/.config/nvim/lua/plugins/configs/lsp.lua index 0921d71e..85427c64 100644 --- a/dots/.config/nvim/lua/plugins/configs/lsp.lua +++ b/dots/.config/nvim/lua/plugins/configs/lsp.lua @@ -91,6 +91,29 @@ return { } end, }, + { + "aznhe21/actions-preview.nvim", + opts = { + telescope = { + border = {}, + layout_strategy = "vertical", + layout_config = { + width = 0.8, + height = 0.7 + } + }, + }, + keys = { + { + "lc", + function() + require("actions-preview").code_actions() + end, + desc = "LSP: Code Action", + mode = { "n", "v" }, + }, + }, + }, { "mrcjkb/rustaceanvim", ft = { "rust" }, @@ -168,7 +191,6 @@ return { { "lD", vim.lsp.buf.declaration, desc = "LSP: Declaration" }, { "k", vim.lsp.buf.hover, desc = "LSP: Hover" }, { "K", vim.lsp.buf.signature_help, desc = "LSP: Sig Help" }, - { "lc", vim.lsp.buf.code_action, desc = "LSP: Code Action" }, { "lR", ":LspRestart", desc = "LSP: Restart" }, { "ls",