Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only consider code actions for diagnostics under cursor - issue and PR in neovim core that is relevant here #40

Open
IndianBoy42 opened this issue May 2, 2024 · 0 comments

Comments

@IndianBoy42
Copy link

IndianBoy42 commented May 2, 2024

neovim/neovim#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 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant