1
1
mirror of https://github.com/oxalica/nil.git synced 2024-11-23 12:03:30 +03:00

Show incomplete syntax as errors by default

Fixes #11
This commit is contained in:
oxalica 2022-09-22 22:32:11 +08:00
parent 40c75334a0
commit c785fc55f4

View File

@ -63,9 +63,8 @@ pub(crate) fn to_diagnostics(
for diag in diags {
let primary_diag = lsp::Diagnostic {
severity: match diag.severity() {
Severity::Error => Some(DiagnosticSeverity::ERROR),
Severity::Error | Severity::IncompleteSyntax => Some(DiagnosticSeverity::ERROR),
Severity::Warning => Some(DiagnosticSeverity::WARNING),
Severity::IncompleteSyntax => continue,
},
range: to_range(&line_map, diag.range),
code: None,