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
We implemented the following scenario in the Ruby LSP (PR):
A user is modifying files. Diagnostics are served using pull diagnostics (textDocument/diagnostic)
The user decides to change the configurations for the linter. This is done by editing .rubocop.yml
We then reload the linter with the new configurations and clear the existing diagnostics, since they may no longer be valid
The flow of clearing the diagnostics is simply:
The server receives a workspace/didChangeWatchedFiles notification including .rubocop.yml
We fire textDocument/publishDiagnostics notifications with empty arrays to clear the diagnostics on all currently opened files
However, this does not seem to work. We use the same technique to clear diagnostics on textDocument/didClose and that works properly, but trying to clear the diagnostics when a watched file notification comes in doesn't do anything.
I tried debugging the code for vscode-languageclient to see if our notifications were being received and processed and everything seemed fine, but the diagnostics still won't go away.
Are we doing something incorrectly? Or is this a bug somewhere?
The text was updated successfully, but these errors were encountered:
The fact that the client doesn't include the configuration file's extension as part of its document selector shouldn't matter, right? That is, the configuration file is YAML, but the client doesn't include YAML in the selector.
Do you have any tips for trying to debug this? It's easy for me to reproduce, so if you can point me to where the clearing of the diagnostics happen I can check what's going on.
We implemented the following scenario in the Ruby LSP (PR):
textDocument/diagnostic
).rubocop.yml
The flow of clearing the diagnostics is simply:
workspace/didChangeWatchedFiles
notification including.rubocop.yml
textDocument/publishDiagnostics
notifications with empty arrays to clear the diagnostics on all currently opened filesHowever, this does not seem to work. We use the same technique to clear diagnostics on
textDocument/didClose
and that works properly, but trying to clear the diagnostics when a watched file notification comes in doesn't do anything.I tried debugging the code for
vscode-languageclient
to see if our notifications were being received and processed and everything seemed fine, but the diagnostics still won't go away.Are we doing something incorrectly? Or is this a bug somewhere?
The text was updated successfully, but these errors were encountered: