Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty FormattingOptions #264

Open
onelson opened this issue Jan 7, 2022 · 1 comment
Open

Empty FormattingOptions #264

onelson opened this issue Jan 7, 2022 · 1 comment
Labels

Comments

@onelson
Copy link

onelson commented Jan 7, 2022

Description:

I've been trying to build a plugin to talk to an LSP server written with lspower, and I'm finding it rejects request bodies that don't strictly conform to the LSP spec.

A concrete case (using 0.94.2) is a request for formatting looks like:

{
  "jsonrpc": "2.0",
  "id": "16",
  "method": "textDocument/formatting",
  "params": {
    "textDocument": {
      "uri": "file:///home/onelson/Projects/flux/check2.flux"
    },
    "options": {}
  }
}

to which the LSP server replies:

{
  "code": -32602,
  "message": "missing field `tabSize`"
}

Per the spec, both tabSize and insertSpaces are required fields for this payload, but both are missing for some reason.

Steps to reproduce:

Affected Versions:

0.94.2

Related Issues (optional):

Suggested Labels (optional):

Suggested Assignees (optional):

@onelson
Copy link
Author

onelson commented Jan 7, 2022

As an aside, I tried master-SNAPSHOT and wasn't able to test this specifically because of a similar problem much earlier during the capabilities checks in initialization. codeActionKind was missing from CodeActionClientCapabilities causing the initialization to fail.

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

No branches or pull requests

1 participant