mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Update to lsp-types 0.58.0
This commit is contained in:
parent
cf8e59ddd8
commit
9bfdab7089
4 changed files with 11 additions and 11 deletions
|
@ -2,7 +2,7 @@ use std::{fmt::Write as _, io::Write as _};
|
|||
|
||||
use gen_lsp_server::ErrorCode;
|
||||
use lsp_types::{
|
||||
CodeAction, CodeActionResponse, CodeLens, Command, Diagnostic, DiagnosticSeverity,
|
||||
CodeAction, CodeActionOrCommand, CodeActionResponse, CodeLens, Command, Diagnostic, DiagnosticSeverity,
|
||||
DocumentFormattingParams, DocumentHighlight, DocumentSymbol, FoldingRange, FoldingRangeKind,
|
||||
FoldingRangeParams, Hover, HoverContents, Location, MarkupContent, MarkupKind, Position,
|
||||
PrepareRenameResponse, Range, RenameParams, SymbolInformation, TextDocumentIdentifier,
|
||||
|
@ -665,7 +665,7 @@ pub fn handle_code_action(
|
|||
|
||||
let assists = world.analysis().assists(FileRange { file_id, range })?.into_iter();
|
||||
let diagnostics = world.analysis().diagnostics(file_id)?;
|
||||
let mut res: Vec<CodeAction> = Vec::new();
|
||||
let mut res: CodeActionResponse = Default::default();
|
||||
|
||||
let fixes_from_diagnostics = diagnostics
|
||||
.into_iter()
|
||||
|
@ -689,7 +689,7 @@ pub fn handle_code_action(
|
|||
edit: None,
|
||||
command: Some(command),
|
||||
};
|
||||
res.push(action);
|
||||
res.push(CodeActionOrCommand::CodeAction(action));
|
||||
}
|
||||
|
||||
for assist in assists {
|
||||
|
@ -711,10 +711,10 @@ pub fn handle_code_action(
|
|||
edit: None,
|
||||
command: Some(command),
|
||||
};
|
||||
res.push(action);
|
||||
res.push(CodeActionOrCommand::CodeAction(action));
|
||||
}
|
||||
|
||||
Ok(Some(CodeActionResponse::Actions(res)))
|
||||
Ok(Some(res))
|
||||
}
|
||||
|
||||
pub fn handle_code_lens(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue