dotfiles/.config/nvim/lua/plugins/extras/lsp/actions-preview.lua

28 lines
703 B
Lua

return {
{
"aznhe21/actions-preview.nvim",
event = "BufRead",
opts = {
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,
},
},
},
},
{
"neovim/nvim-lspconfig",
init = function()
local keys = require("lazyvim.plugins.lsp.keymaps").get()
keys[#keys + 1] = { "<leader>ca", require("actions-preview").code_actions, desc = "Code Action Preview" }
end,
},
}