-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Implement the new LSP diagnostic pull model #3600
Comments
Someone nudge me when this is implemented in the actual spec, and I'll support it. |
@hsanson They actually did it in the past couple of days! The suggestion I made for a "pull" model for diagnostics instead of a "push" model as an option has been written into the protocol spec. Now we can implement support for it in ALE as the preferred option, so you only see diagnostics in response to an ALE lint cycle. |
There's probably an actual server that implements the pull model now I can test against. I pinned this issue so I can try to remember to implement this. |
rust-analyzer has just implemented the pull model, so maybe it could be used for testing if you're going to work on this feature. |
What is the bug?
We fix it by implementing the pull model and forcing servers to adapt, plus being careful about when we send document updates.
History
microsoft/vscode#117042
A proposal under review will allow LSP clients to explicitly request diagnostics from language servers, instead of receiving them at random. This will fix issues such as #3555 where you can receive diagnostics due to ALE having to tell servers that changes have been made to files for features like completion to work, even though you don't want them yet.
If/when this proposal is adopted and the protocol is updated, we should implement support for it in ALE so newer versions of servers automatically stop causing this problem for users over time.
Update August 2024: This became part of the Language Server Protocol standard, and now depending on the language server, we can support this in ALE.
Implementation
The text was updated successfully, but these errors were encountered: