-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
What is the bug?
- You do just about anything with a language server, such as completion
- You have to send the document updates to the language server
- Without the "pull model" the client (ALE) has no control over when diagnostics are sent
- You can't just "ignore" diagnostics "until you are ready," you have to show them when they come
- Users perceive that "linting" is happening when they don't want it to, which annoys users
We fix it by implementing the pull model and forcing servers to adapt, plus being careful about when we send document updates.
History
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
- Implement the pull model!
- Limit the number of document updates based on updates that are strictly necessary for functionality only. (Hard to manage!)