Skip to content

Commit

Permalink
feat(lsp): add actions-preview.nvim plugin (#855)
Browse files Browse the repository at this point in the history
* feat(lsp): add `actions-preview.nvim` plugin

* feat(actions-preview-nvim): Lazy load plugin

Co-authored-by: Micah Halter <micah@mehalter.com>

* refactor(actions-preview-nvim): made mapping smaller

---------

Co-authored-by: Uzair Aftab <48220549+Uzaaft@users.noreply.github.com>
Co-authored-by: Micah Halter <micah@mehalter.com>
  • Loading branch information
3 people authored Apr 10, 2024
1 parent 1d41ad0 commit 3f64ba3
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/astrocommunity/lsp/actions-preview-nvim/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Actions Preview

Fully customizable previewer for LSP code actions.

**Repository:** <https://github.com/aznhe21/actions-preview.nvim>
30 changes: 30 additions & 0 deletions lua/astrocommunity/lsp/actions-preview-nvim/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---@type LazySpec
return {
"aznhe21/actions-preview.nvim",
lazy = true,
dependencies = {
"nvim-telescope/telescope.nvim",
{
"AstroNvim/astrolsp",
---@type AstroLSPOpts
opts = {
mappings = {
n = {
["<Leader>la"] = {
function() require("actions-preview").code_actions() end,
desc = "LSP code action",
cond = "testDocument/codeAction",
},
},
v = {
["<Leader>la"] = {
function() require("actions-preview").code_actions() end,
desc = "LSP code action",
cond = "testDocument/codeAction",
},
},
},
},
},
},
}

0 comments on commit 3f64ba3

Please sign in to comment.