Skip to content
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.

code_action does not work for Java without nvim-jdtls #160

Open
callebstrom opened this issue Sep 7, 2021 · 3 comments
Open

code_action does not work for Java without nvim-jdtls #160

callebstrom opened this issue Sep 7, 2021 · 3 comments

Comments

@callebstrom
Copy link

callebstrom commented Sep 7, 2021

Hi,

Is it a known bug with the jdtls server that vim.lsp.buf.code_action() does not work?

I keep getting the error No delegateCommandHandler for java.apply.workspaceEdit. Using code_action via nvim-jdtls works however, so I am not quite sure if this is meant to be supported without the nvim-jdtls plugin?

I would like to only use this plugin if possible, but currently it looks like I need nvim-jdtls in order to have functioning code_action functionality via :lua require('jdtls').code_action(). This has the drawback that I cannot use code action improvements from other plugins, such as lspsaga, as the underlying vim.lsp.buf.code_action() is not working.

Is this expected behaviour in the current iteration of jdtls in nvim-lspinstall?

@callebstrom callebstrom changed the title code_action does not work for Java code_action does not work for Java without nvim-jdtls Sep 7, 2021
@callebstrom
Copy link
Author

Perhaps @alanjjenkins could shed some light on this?

@alisonjenkins
Copy link
Contributor

Hey @callebstrom,

Yes the dependency on jdtls is expected with the version that I implemented as the assumption at the time was that I was just trying to get jdtls working with Neovim via nvim-lspinstall so that we had proper LSP support for Java so it will likely need some form of refactor to make it so we can use other lsp integrations in place of it.

Unfortunately I do not currently have time to look at this but I will add this to my todo list to look at at some point (no idea when I will get to this at current).

So please do take a look at the code if you have time to do so and see if you can figure out what is required.

Thanks,

Alan Jenkins

@callebstrom
Copy link
Author

callebstrom commented Sep 7, 2021

Cool, that makes perfect sense. Thanks!

I could try and see if I can port parts of nvim-jdtls to allow for code_actions at least. No promises though as I am not too well-versed in vim plugins unfortunately. I will let you know if I find something 👍

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

No branches or pull requests

2 participants