You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the language server updates its cache of diagnostics and visual aids only on a fresh document open or when the document is saved. This means that a user only gets updates when the file in buffer is saved.
For most editing practices, this is sufficient. You don't want your tool to constantly be updating, as this can be annoying or cause some diagnostics to break. But there are other ways a files buffer may change without a save event, where you want the diagnostics to update. For example, git operations routinely change the underlying file, but the language server doesn't count that as a save event. It does count it as a change event. Similarly, something like chplcheck --fixit will cause the file to change without the language server updating.
This can result in diagnostic artifacts like this, where the lint no longer applies because the file has changed.
I am inclined to just update the language server to update on textDocument/didChange (which is a small code change to support it). But in the past, I recall some opposition to this (namely @DanilaFe?) for specific reasons I don't recall, hence this issue
Note this effects both chpl-language-server and chplcheck
The text was updated successfully, but these errors were encountered:
I suspect my concerns were cache effects, the lack of partial parsing, and triggering query system bugs. If you feel the LS is stable without them, a (on by default, but toggleable) flag to respond to didChange events might be fine.
Currently, the language server updates its cache of diagnostics and visual aids only on a fresh document open or when the document is saved. This means that a user only gets updates when the file in buffer is saved.
For most editing practices, this is sufficient. You don't want your tool to constantly be updating, as this can be annoying or cause some diagnostics to break. But there are other ways a files buffer may change without a save event, where you want the diagnostics to update. For example, git operations routinely change the underlying file, but the language server doesn't count that as a save event. It does count it as a change event. Similarly, something like
chplcheck --fixit
will cause the file to change without the language server updating.This can result in diagnostic artifacts like this, where the lint no longer applies because the file has changed.
I am inclined to just update the language server to update on
textDocument/didChange
(which is a small code change to support it). But in the past, I recall some opposition to this (namely @DanilaFe?) for specific reasons I don't recall, hence this issueNote this effects both
chpl-language-server
andchplcheck
The text was updated successfully, but these errors were encountered: