Skip to content

Commit 9bfdab7

Browse files
committed
Update to lsp-types 0.58.0
1 parent cf8e59d commit 9bfdab7

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/gen_lsp_server/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
88
description = "Generic LSP server scaffold."
99

1010
[dependencies]
11-
lsp-types = "0.57.0"
11+
lsp-types = "0.58.0"
1212
log = "0.4.3"
1313
serde_json = "1.0.34"
1414
serde = { version = "1.0.83", features = ["derive"] }

crates/ra_lsp_server/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ crossbeam-channel = "0.3.5"
1313
flexi_logger = "0.13.0"
1414
log = "0.4.3"
1515
url_serde = "0.2.0"
16-
lsp-types = { version = "0.57.1", features = ["proposed"] }
16+
lsp-types = { version = "0.58.0", features = ["proposed"] }
1717
rustc-hash = "1.0"
1818
parking_lot = "0.8.0"
1919

crates/ra_lsp_server/src/main_loop/handlers.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::{fmt::Write as _, io::Write as _};
22

33
use gen_lsp_server::ErrorCode;
44
use lsp_types::{
5-
CodeAction, CodeActionResponse, CodeLens, Command, Diagnostic, DiagnosticSeverity,
5+
CodeAction, CodeActionOrCommand, CodeActionResponse, CodeLens, Command, Diagnostic, DiagnosticSeverity,
66
DocumentFormattingParams, DocumentHighlight, DocumentSymbol, FoldingRange, FoldingRangeKind,
77
FoldingRangeParams, Hover, HoverContents, Location, MarkupContent, MarkupKind, Position,
88
PrepareRenameResponse, Range, RenameParams, SymbolInformation, TextDocumentIdentifier,
@@ -665,7 +665,7 @@ pub fn handle_code_action(
665665

666666
let assists = world.analysis().assists(FileRange { file_id, range })?.into_iter();
667667
let diagnostics = world.analysis().diagnostics(file_id)?;
668-
let mut res: Vec<CodeAction> = Vec::new();
668+
let mut res: CodeActionResponse = Default::default();
669669

670670
let fixes_from_diagnostics = diagnostics
671671
.into_iter()
@@ -689,7 +689,7 @@ pub fn handle_code_action(
689689
edit: None,
690690
command: Some(command),
691691
};
692-
res.push(action);
692+
res.push(CodeActionOrCommand::CodeAction(action));
693693
}
694694

695695
for assist in assists {
@@ -711,10 +711,10 @@ pub fn handle_code_action(
711711
edit: None,
712712
command: Some(command),
713713
};
714-
res.push(action);
714+
res.push(CodeActionOrCommand::CodeAction(action));
715715
}
716716

717-
Ok(Some(CodeActionResponse::Actions(res)))
717+
Ok(Some(res))
718718
}
719719

720720
pub fn handle_code_lens(

0 commit comments

Comments
 (0)