1

VS Code error hi-lighting can offer quite a bit of clutter during code edits with its squiggles and colorization. It is a useful horn but once the problem is noticed it can become a nuisance that even makes it difficult to perceive the text and fix the problem. I don't think this feature was intended to get in the way.

Is there a convenient way to toggle VSCode error hi-lighting on and off without going through settings.json and playing with a bunch of flags?

Conclusion...

  • Feature does not exist.

  • Work around is to install and use the When_File VSCode extension to mask the error noise with less visible colors when the file has unsaved edits, as clarified below.

George
  • 2,451
  • 27
  • 37
  • 2
    Does this answer your question? [How can I easily toggle display of problem underlining in VS Code editor panels?](https://stackoverflow.com/questions/74753185/how-can-i-easily-toggle-display-of-problem-underlining-in-vs-code-editor-panels) – starball Jun 02 '23 at 19:26
  • I believe the older rust extension had a setting to control debounce time of code analysis, but when I looked through the settings of Rust Analyzer, it looks like it doesn't have something similar. Or maybe I just missed it. – starball Jun 02 '23 at 19:26

1 Answers1

2

you can use the extension When File

Add this setting to your workspace settings.json

  "whenFile.change": {
    "byLanguageId": {
      "rust": {
        "whenDirty": {
          "editorError.foreground": "#ff000020",
          "editorWarning.foreground": "#ff000020",
          "editorInfo.foreground": "#ff000020"
        }
      }
    }
  }
rioV8
  • 24,506
  • 3
  • 32
  • 49