Add code actions prefix UI

Not only does this show a diff of the selected code action before you
apply it, it uses Telescope for display and selection of the desired
code action.
This commit is contained in:
Kenneth Benzie 2024-03-05 23:34:20 +00:00
parent e314314574
commit 6ef97d96c5

View File

@ -13,6 +13,9 @@ return {
'hrsh7th/cmp-cmdline', -- Source for command-line
'hrsh7th/nvim-cmp', -- Completion engine combines and use the above
-- LSP UI plugins
'aznhe21/actions-preview.nvim',
-- Lue vim module support in lua language server
'folke/neodev.nvim',
@ -108,7 +111,8 @@ return {
-- coc.nvim was being weird about it
-- Fixit mapping, or close enough, actually any code action
vim.keymap.set('n', '<leader>fi', vim.lsp.buf.code_action, opts)
vim.keymap.set('n', '<leader>fi',
require("actions-preview").code_actions, opts)
-- Goto definition mapping
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)