Open IndianBoy42 opened 3 months ago
https://github.com/neovim/neovim/pull/25747
I see quite a lot of duplication of the vim.lsp.buf.code_actions code here, I wonder if there is a better architecture that would remove the need for that.
vim.lsp.buf.code_actions
The docs say the real customization point is vim.ui.select (https://github.com/neovim/neovim/blob/2980dcd33c9028a2aaad56494e00786fdb439e2f/runtime/lua/vim/lsp/buf.lua#L579), perhaps there is a way to override that that doesn't clobber the user config too badly. vim.ui.select is called with kind = "codeaction" so a wrapper could be made that does the preview for codeactions and defers to the users vim.ui.select for the rest
vim.ui.select
kind = "codeaction"
https://github.com/neovim/neovim/pull/25747
I see quite a lot of duplication of the
vim.lsp.buf.code_actions
code here, I wonder if there is a better architecture that would remove the need for that.The docs say the real customization point is
vim.ui.select
(https://github.com/neovim/neovim/blob/2980dcd33c9028a2aaad56494e00786fdb439e2f/runtime/lua/vim/lsp/buf.lua#L579), perhaps there is a way to override that that doesn't clobber the user config too badly.vim.ui.select
is called withkind = "codeaction"
so a wrapper could be made that does the preview for codeactions and defers to the users vim.ui.select for the rest