Update lsp-types to properly handle brackets (#37166)
Closes #21062 See also this pull request: https://github.com/zed-industries/lsp-types/pull/6. Release Notes: - Fixed incorrect URL encoding of file paths with `[` `]` in them
This commit is contained in:
@@ -202,7 +202,7 @@ pub struct Diagnostic {
|
||||
pub source: Option<String>,
|
||||
/// A machine-readable code that identifies this diagnostic.
|
||||
pub code: Option<NumberOrString>,
|
||||
pub code_description: Option<lsp::Url>,
|
||||
pub code_description: Option<lsp::Uri>,
|
||||
/// Whether this diagnostic is a hint, warning, or error.
|
||||
pub severity: DiagnosticSeverity,
|
||||
/// The human-readable message associated with this diagnostic.
|
||||
|
||||
@@ -431,7 +431,7 @@ pub fn deserialize_diagnostics(
|
||||
code: diagnostic.code.map(lsp::NumberOrString::from_string),
|
||||
code_description: diagnostic
|
||||
.code_description
|
||||
.and_then(|s| lsp::Url::parse(&s).ok()),
|
||||
.and_then(|s| lsp::Uri::from_str(&s).ok()),
|
||||
is_primary: diagnostic.is_primary,
|
||||
is_disk_based: diagnostic.is_disk_based,
|
||||
is_unnecessary: diagnostic.is_unnecessary,
|
||||
|
||||
Reference in New Issue
Block a user