- **store `buffer::Diagnostic`as NumberOrString instead of assuming String** - **update zed-industries/lsp-types rev** Closes #24081 Release Notes: - Fixed an issue where language server diagnostic codes would be converted to strings leading to errors with some language servers
This commit is contained in:
parent
10b6bc2508
commit
8b3d315e40
6 changed files with 12 additions and 22 deletions
|
@ -56,17 +56,11 @@ impl DiagnosticEntry<PointUtf16> {
|
|||
/// Returns a raw LSP diagnostic used to provide diagnostic context to LSP
|
||||
/// codeAction request
|
||||
pub fn to_lsp_diagnostic_stub(&self) -> Result<lsp::Diagnostic> {
|
||||
let code = self
|
||||
.diagnostic
|
||||
.code
|
||||
.clone()
|
||||
.map(lsp::NumberOrString::String);
|
||||
|
||||
let range = range_to_lsp(self.range.clone())?;
|
||||
|
||||
Ok(lsp::Diagnostic {
|
||||
code,
|
||||
range,
|
||||
code: self.diagnostic.code.clone(),
|
||||
severity: Some(self.diagnostic.severity),
|
||||
source: self.diagnostic.source.clone(),
|
||||
message: self.diagnostic.message.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue