sgwilym / nova-deno

A Deno extension for Nova.
https://extensions.panic.com/extensions/co.gwil/co.gwil.deno/
MIT License
15 stars 1 forks source link

deno.cache command results in 'method not found' alert #31

Closed sgwilym closed 11 months ago

sgwilym commented 2 years ago

Not sure if this is an issue with Nova or the Deno LSP honestly.

790bc4920a038072c5e70f0dbad1a50ff80952dc


Deno Language Server[15:32:40.040000] Sending JSON-RPC request: 82 workspace/executeCommand
{
  "jsonrpc" : "2.0",
  "id" : 82,
  "method" : "workspace\/executeCommand",
  "params" : {
    "command" : "deno.cache",
    "arguments" : [
      [
        "https:\/\/deno.land\/std\/bytes\/bytes_list.ts"
      ]
    ]
  }
}

Deno Language Server[15:32:40.040000] Got a workspace/executeCommand request, but it is not implemented

Deno Language Server[15:32:40.087000] Received JSON-RPC response: 82 workspace/executeCommand
{
  "error" : {
    "message" : "Method not found",
    "code" : -32601
  },
  "id" : 82,
  "jsonrpc" : "2.0"
}

Deno Language Server[15:32:40.087000] -32601 Method not found```
belcar-s commented 2 years ago

I don't know if this information is novel, but I think I've confirmed that the Visual Studio Code extension registers a deno.cache command, which is somehow invoked when the code action is selected.

extension console showing a message indicating the execution of the `deno.cache` command registered by the Deno Visual Studio Code extension

Registering a deno.cache command ourselves doesn't work, as described here: https://devforum.nova.app/t/lsp-executecommand-and-method-not-found-alert-whos-requesting-who/1650/4

Maybe this requires Nova to imitate VS Code's behavior, which is supposedly to execute extension-registered commands in response to certain LSP requests (?).

sgwilym commented 11 months ago

As of Nova 11.7 and Deno 1.38.5, this seems to have been fixed!!!