Description
In Visual Studio, it has two kinds of error squiggles: blue squiggles come from when you build a project (using the Project>Build menu item) and are obtained by scraping the output of the build tool; red squiggles come "as-you-type" from the language service and are only ever generated for the file you're currently editing, and even then only up to a limit (a few hundred?). It will be common that a red squiggle and a blue squiggle coincide (because the same error is reported both by the project-build and by the language service) - in this case the red one replaces the blue one.
The idea is that (1) you can't reasonably expect the full set of errors for a project to be recalculated every keystroke; (2) the user deserves some indication that the build-time squiggles are "stale" and require a manual step to generate.
How do folks feel about this in VSCode and LSP? (I'm wanting to do this for my language service).
OPTION 1 This is a question that should be unrelated to LSP. LSP should solely be for the "red" squiggles. The editor itself should figure out when to invoke a command-line build, and scrape blue squiggles from it, and display them, and the editor should figure out how to de-dupe red and blue squiggles.
OPTION 2 This functionality should be rolled into LSP. The "publishDiagnostics" message from the LSP server should indicate whether a given squiggle is blue or red. There should be an additional LSP method to "kick off a build".