-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
Fix invalid client/registerCapability request #2436
Conversation
I found this issue initially in Sublime Text but trying latest release (0.29.0) in VSCode, it is also failing there: Details
|
This also explains this problem. But I think it's reserved for old version compatibility. Line 40 in 1851d1c
|
c736932
to
23c636a
Compare
I've updated that one too and also rewritten the commit message to better describe the problem. Decided to not remove the selector but just update it to a spec-compatible format since that is safer. |
I built it and pointed the extension to the build.
|
Yes, I see that. Thanks for checking. Will have a deeper look but as far as I can see the current code has two more problems:
|
From what I understand, it's safe to do any request to the client after the client notified |
Right. And vetur sends |
@J3m5 latest changes should resolve the issue with double-registration and too-early-registration |
The issue is gone, well done! |
923cb13
to
23c8373
Compare
Per current version of the spec [1], the "documentSelector" is a list of DocumentFilter and can not contain a string. It seems like it was allowed to have a string in the past [2] but it's no longer the case and it doesn't work even in VSCode. [1] https://microsoft.github.io/language-server-protocol/specification#documentFilter [2] microsoft/vscode-languageserver-node#685 Resolves vuejs#2388
- setupDynamicFormatters() was called too early. Can only be called after `initialized`. - It should be enough to call it from "onDidChangeConfiguration" as that notification is guaranteed to be called by the client. - Avoid double-registration by not calling it from "init".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, other than a small nitpick.
Per current version of the spec [1], the "documentSelector" is a list of
DocumentFilter and can not contain a string.
It seems like it was allowed to have a string in the past [2] but it's
no longer the case and it doesn't work even in VSCode.
[1] https://microsoft.github.io/language-server-protocol/specification#documentFilter
[2] microsoft/vscode-languageserver-node#685
Resolves #2388