Added actions preview plugin
This commit is contained in:
parent
b4dfc6cfc0
commit
535ad35ded
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
|
"actions-preview.nvim": { "branch": "master", "commit": "36513ad213855d497b7dd3391a24d1d75d58e36f" },
|
||||||
"blink.cmp": { "branch": "main", "commit": "022521a8910a5543b0251b21c9e1a1e989745796" },
|
"blink.cmp": { "branch": "main", "commit": "022521a8910a5543b0251b21c9e1a1e989745796" },
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "6feb2f28f9a9385e401857b21eeac3c1b66dd628" },
|
"conform.nvim": { "branch": "master", "commit": "6feb2f28f9a9385e401857b21eeac3c1b66dd628" },
|
||||||
|
|
|
@ -27,7 +27,9 @@ map("<leader>th", function()
|
||||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
|
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
|
||||||
end, "Toggle inlay hints")
|
end, "Toggle inlay hints")
|
||||||
|
|
||||||
map("gra", vim.lsp.buf.code_action, "Code actions", { "n", "x" })
|
map("gra", function()
|
||||||
|
require("actions-preview").code_actions()
|
||||||
|
end, "Code actions", { "n", "x" })
|
||||||
map("grD", vim.lsp.buf.declaration, "Goto declaration")
|
map("grD", vim.lsp.buf.declaration, "Goto declaration")
|
||||||
map("grd", function()
|
map("grd", function()
|
||||||
require("telescope.builtin").lsp_definitions({ jump_type = "never" })
|
require("telescope.builtin").lsp_definitions({ jump_type = "never" })
|
||||||
|
|
28
nvim/dot-config/nvim/lua/plugins/actions-preview.lua
Normal file
28
nvim/dot-config/nvim/lua/plugins/actions-preview.lua
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
-- https://github.com/aznhe21/actions-preview.nvim
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
|
return {
|
||||||
|
"aznhe21/actions-preview.nvim",
|
||||||
|
opts = function()
|
||||||
|
local hl = require("actions-preview.highlight")
|
||||||
|
return {
|
||||||
|
backend = { "telescope" },
|
||||||
|
highlight_command = {
|
||||||
|
hl.delta(),
|
||||||
|
},
|
||||||
|
telescope = {
|
||||||
|
sorting_strategy = "ascending",
|
||||||
|
layout_strategy = "vertical",
|
||||||
|
layout_config = {
|
||||||
|
width = 0.8,
|
||||||
|
height = 0.9,
|
||||||
|
prompt_position = "top",
|
||||||
|
preview_cutoff = 20,
|
||||||
|
preview_height = function(_, _, max_lines)
|
||||||
|
return max_lines - 15
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user