lsp: Pass back diagnostic .data when querying code actions for it (#14962)
Per the LSP spec, we should pass .data field of diagnostics into code action request: ``` /** * A data entry field that is preserved between a * `textDocument/publishDiagnostics` notification and * `textDocument/codeAction` request. * * @since 3.16.0 */ data?: LSPAny; ``` Release Notes: - Fixed rare cases where a code action triggered by diagnostic may not be available for use.
This commit is contained in:
parent
10d2353e07
commit
865904a0c9
6 changed files with 18 additions and 1 deletions
|
@ -69,6 +69,7 @@ impl DiagnosticEntry<PointUtf16> {
|
|||
severity: Some(self.diagnostic.severity),
|
||||
source: self.diagnostic.source.clone(),
|
||||
message: self.diagnostic.message.clone(),
|
||||
data: self.diagnostic.data.clone(),
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue