ruby-lsp icon indicating copy to clipboard operation
ruby-lsp copied to clipboard

VSCode: "Pull diagnostics on save" setting is not working

Open mckeed opened this issue 1 year ago • 2 comments

Description

When I set "rubyLsp.pullDiagnosticsOn": "save", diagnostics do not show up after saving a file.

Reproduction steps

  1. Open a workspace in VSCode where Ruby LSP works properly
  2. Change the rubyLsp.pullDiagnosticsOn setting to "save"
  3. Make a syntax error in an open ruby file and save the file.
  4. The error is not highlighted.
  5. Closing the tab and re-opening the file highlights the error as expected.

mckeed avatar May 10 '24 18:05 mckeed

:wave: Thanks for the report, I am able to reproduce.

andyw8 avatar May 10 '24 18:05 andyw8

Observations:

  • By default, when we make a change to a file, a textDocument/diagnostic is sent.
  • With rubyLsp.pullDiagnosticsOn set to save, and we use "Save Without Formatting", there is a notification for didChangeWatchedFiles, but not for textDocument/diagnostic.
  • With rubyLsp.pullDiagnosticsOn set to save, and we save normally, there are notifications for textDocument/didChange and workspace/didChangeWatchedFiles.

andyw8 avatar May 10 '24 19:05 andyw8

This issue is being marked as stale because there was no activity in the last 2 months

github-actions[bot] avatar Jul 10 '24 12:07 github-actions[bot]