mirror of
https://github.com/nushell/nushell.git
synced 2025-05-07 00:12:58 +00:00
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:
parent
49d86855ce
commit
334cf1862a
@ -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
|
self.connection
|
||||||
.sender
|
.sender
|
||||||
.send(lsp_server::Message::Notification(
|
.send(lsp_server::Message::Notification(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user