Add support for publishDiagnostics (#4912)

<img width="536" alt="Screenshot 2025-02-06 at 3 02 18 PM"
src="https://github.com/user-attachments/assets/27b7673d-f8d4-4f9f-9e5d-20c3a88b8c78"
/>

Requires the caching work in #4897
This commit is contained in:
Jon Ross-Perkins
2025-02-07 23:04:35 +00:00
committed by GitHub
parent 1917ea223e
commit f89985d0f4
17 changed files with 349 additions and 37 deletions
+9
View File
@@ -42,6 +42,15 @@ constexpr DiagnosticKind UntestedDiagnosticKinds[] = {
// This is a little long but is tested in lex/numeric_literal_test.cpp.
DiagnosticKind::TooManyDigits,
// TODO: This can only fire if the first message in a diagnostic is rooted
// in a file other than the file being compiled. The language server
// currently only supports compiling one file at a time. Do one of:
// - When imports are supported, find a diagnostic whose first message isn't
// in the current file.
// - Require all diagnostics produced by compiling have their first location
// be in the file being compiled, never an import.
DiagnosticKind::LanguageServerDiagnosticInWrongFile,
};
// Looks for diagnostic kinds that aren't covered by a file_test.