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

Deprecate custom code_action method #192

Merged
merged 1 commit into from
Dec 7, 2021
Merged

Deprecate custom code_action method #192

merged 1 commit into from
Dec 7, 2021

Conversation

mfussenegger
Copy link
Owner

With neovim 0.6 it is possible to use the built-in
vim.lsp.buf.code_action function and still have all extensions from
jdtls work.

With neovim 0.6 it is possible to use the built-in
vim.lsp.buf.code_action function and still have all extensions from
jdtls work.
@axieax
Copy link

axieax commented Dec 13, 2021

With neovim 0.6 it is possible to use the built-in vim.lsp.buf.code_action function and still have all extensions from jdtls work.

Hi will Telescope lsp_code_actions be supported as well? Although the code action options appear, using some (such as toString) displays the following error:
jdt.ls: -32601: No delegateCommandHandler for java.action.generateToStringPrompt

@mfussenegger
Copy link
Owner Author

No telescope implements their own code-action (and from a quick look it looks incomplete and does some stuff that hasn't been necessary for a long time)

But it looks like you could use https://github.com/nvim-telescope/telescope-ui-select.nvim so that the built-in vim.lsp.buf.code_action will use telescope for the selection

@axieax
Copy link

axieax commented Dec 15, 2021

Oh I see.. I didn't realise Telescope did their own thing ahaha
I usually use https://github.com/weilbith/nvim-code-action-menu to get code action previews for most other languages and thought nvim-jdtls could integrate with it the same way since vim.lsp.buf.code_action is now supported. Not sure if this is possible tho 🤔

@mfussenegger
Copy link
Owner Author

nvim-code-action-menu also re-implements the code-action functionality from scratch and is incomplete. It doesn't support client side commands.

It's not that nvim-jdtls would have to integrate nvim-code-action-menu, it's that other plugins shouldn't re-implement the entire code-action functionality themselves - and if they do, they'd need to implement all of it. Which afaik currently none does.

That nvim-jdtls had its own code_action function was due to missing functionality/extension points in neovim, but all the missing bits got integrated into neovim 0.6

@axieax
Copy link

axieax commented Dec 15, 2021

Fair enough, really appreciate the clarification!

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

Successfully merging this pull request may close these issues.

2 participants