Code actions not working with Deno LSP - documentChanges support needed?

This is starting to drive me crazy (and back to Sublime).

@logan If Nova doesn’t support documentChanges in WorkspaceEdits, then it should be setting WorkspaceEditClientCapabilities.documentChanges to false (docs) if my reading of the spec is correct.

From WorkspaceEdit link above:

If a client doesn’t support documentChanges or workspace.workspaceEdit.resourceOperations, then only plain TextEdits using the changes property are supported.

Currently, Nova sets this capability to true in its initialize message to language servers (2nd to last setting pasted below):

{
  "jsonrpc": "2.0",
  "id": 0,
  "method": "initialize",
  "params": {
    "capabilities": {
      "workspace": {
        "configuration": true,
        "applyEdit": true,
        "didChangeConfiguration": {},
        "executeCommand": {},
        "workspaceFolders": true,
        "workspaceEdit": {
          "failureHandling": "undo",
          "documentChanges": true,
          "resourceOperations": ["create", "rename", "delete"]
        }
      },
      ...
    }
  }
}
3 Likes