feat(lsp): parse_warnings in diagnostics report (#15449)

# Description

Add parse warnings to LSP diagnostics, not particularly useful but
technically should be done.

# User-Facing Changes

# Tests + Formatting

There's no deprecated command to test for now.

# After Submitting
This commit is contained in:
zc he 2025-03-29 20:16:44 +08:00 committed by GitHub
parent 49d86855ce
commit 334cf1862a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -38,6 +38,17 @@ impl LanguageServer {
});
}
for warn in working_set.parse_warnings.iter() {
let message = warn.to_string();
diagnostics.diagnostics.push(Diagnostic {
range: span_to_range(&warn.span(), file, span.start),
severity: Some(DiagnosticSeverity::WARNING),
message,
..Default::default()
});
}
self.connection
.sender
.send(lsp_server::Message::Notification(