LSP method `workspace/executeCommand` isn't implemented

Nova LanguageClient docs say that the LSP method workspace/executeCommand is supported:

https://docs.nova.app/api-reference/language-client/#workspace

But, the implementation seems to be broken, see details here:

The Deno language server expects the client (my Deno extension) to implement a deno.cache command that should be triggered by the Deno cache code action. I’ve registered deno.cache command that works ok when triggered manually by the user (e.g. via the command palette), but can’t be triggered via the code action, it results in an extension console error:

Got a workspace/executeCommand request, but it is not implemented
Method not found

I’ve tried defining the command under all 4 of the available “sections” (editor, extensions, etc.) but it makes no difference how it’s defined; the same error results.

Really looking forward to either speedy confirmation this is a Nova bug, or guidance on the right way to register the command so it can be triggered by code actions!

Here is the LSP traffic when you click the code action that should trigger the deno.cache command…

Screen Shot 2021-08-19 at 11.22.00 am

Request:

{
  "jsonrpc": "2.0",
  "id": 93,
  "method": "workspace\\/executeCommand",
  "params": {
    "command": "deno.cache",
    "arguments": [
      [
        "https:\\/\\/deno.land\\/x\\/oak\\/application.ts"
      ]
    ]
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 93,
  "error": {
    "code": -32601,
    "message": "Method not found"
  }
}

@logan have you looked into this yet?

If you try something like this, nothing logs so we can’t try to manually execute the command as a workaround:

languageClient.onRequest("workspace/executeCommand", () => {
  console.log('Triggered!')
});

Hello! We haven’t specifically gotten to investigating your report yet, but it’s on our radar. I’m a bit backlogged at the moment but hope to get to it soon.

1 Like

Hi, is there any progress related to this issue one year later?