-
Notifications
You must be signed in to change notification settings - Fork 124
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
DocumentSelector is of wrong type #1056
Comments
Yeah, looks like wrong structure (extra nested arrays): {
"registrations": [
{
"registerOptions": {
"documentSelector": [
[
"DocumentFilter",
{
"pattern": null,
"language": "cram",
"scheme": null
}
],
[
"DocumentFilter",
{
"pattern": null,
"language": "dune",
"scheme": null
}
],
[
"DocumentFilter",
{
"pattern": null,
"language": "dune-project",
"scheme": null
}
],
[
"DocumentFilter",
{
"pattern": null,
"language": "dune-workspace",
"scheme": null
}
]
]
},
"method": "textDocument/didOpen",
"id": "ocamllsp-cram-dune-files/textDocument/didOpen"
},
{
"registerOptions": {
"documentSelector": [
[
"DocumentFilter",
{
"pattern": null,
"language": "cram",
"scheme": null
}
],
[
"DocumentFilter",
{
"pattern": null,
"language": "dune",
"scheme": null
}
],
[
"DocumentFilter",
{
"pattern": null,
"language": "dune-project",
"scheme": null
}
],
[
"DocumentFilter",
{
"pattern": null,
"language": "dune-workspace",
"scheme": null
}
]
]
},
"method": "textDocument/didClose",
"id": "ocamllsp-cram-dune-files/textDocument/didClose"
}
]
} |
You can see this weird DocumentSelector written into the OCaml VSCode extension as well, so that may need to be fixed. |
Yeah, looks like a entirely custom handling that matches on the extension and server side. |
I seem to have figured out what’s going on—the metamodel.json is outdated/wrong, and this issue was fixed in microsoft/vscode-languageserver-node@6568838. I think what is best is that there be some sort of CI to automatically pull the latest from upstream. I will see about making a PR updating the model. |
Hi, I would like to say that this is still an issue. My attempts to generate the metamodel didn’t work, even when I attempted to use the first commit where the metamodel was checked into the repo. There’s nothing I can do. |
Hi all, I’m using ocamllsp version 1.15.1-5.0 on macOS with Sublime Text, and I’m getting errors on the
client/registerCapability
response toinitialize
. I think it’s because documentSelector should be aDocumentFilter list
instead of aDocumentFilter list list
, but the ocamllsp code appears to be correct. I’m not entirely sure where in the code is wrong, and would appreciate some help.See example response here:
The text was updated successfully, but these errors were encountered: