weilbith / nvim-code-action-menu

Pop-up menu for code actions to show meta-information and diff preview
MIT License
577 stars 19 forks source link

Error using jdtls #27

Closed danymat closed 3 years ago

danymat commented 3 years ago

Hello, I'm using your plugin regularly for lspconfig code actions, but using it with jdtls keeps getting me this error:

-32601: No delegateCommandHandler for java.apply.workspaceEdit

weilbith commented 3 years ago

Hey 👋🏾 I'm afraid to tell you this has nothing to do with this plugin. When you execute an action, the NeoVim native LSP functions get executed by this plugin. But it also doesn't look like it is an issue in this layer, but rather the server itself. But I might me completely wrong. Could you please verify that you can execute these actions with native code action selection? Should mean try :lua vim.lsp.buf.code_action() and try to execute an action. If that works, it is an issue with this plugin and I have to fix it. Thanks for helping to fix this.

danymat commented 3 years ago

You're right, I get the error on native code action too. What's different though is that the native code action still do the action (even with the error), what's not the case with the plugin

weilbith commented 3 years ago

Okay... Hmm. 🤔 I just checked if anything in the default code action menu execution chain has changed, but it looks like always. Or at least I don't see it. So you say you get the error in both cases, but on the native "menu"/selection it does apply the workspace changes, but not in case of this plugin. Correct? Many things confuse me here. Especially because the workspace edit gets applied by NeoVim and the server has nothing to do with it. So I don't get the error. 🙈 Could you somehow provide me with an example code where this happens?

Btw: I just wanted to excuse for the late response to your issue. I'm currently traveling and wasn't active on GH.

weilbith commented 3 years ago

@danymat ping

danymat commented 3 years ago

Hello @weilbith, sorry for not answering you, I kinda missed the notification. I do not use jdtls at the moment (and the foreseeable future), and as only I have had this issue, I'm marking it as resolved.

bnwa commented 1 year ago

I get this same error for any code action in Java but vim.lsp.buf.code_action works correctly without error

AndOrangutan commented 1 year ago

I get this same error for any code action in Java but vim.lsp.buf.code_action works correctly without error

Can confirm, native code actions work without hitch.