aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock8
-rw-r--r--crates/gen_lsp_server/Cargo.toml2
-rw-r--r--crates/ra_lsp_server/Cargo.toml2
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs18
4 files changed, 15 insertions, 15 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 643a10370..45735af53 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -541,7 +541,7 @@ dependencies = [
541 "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 541 "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
542 "flexi_logger 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", 542 "flexi_logger 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)",
543 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 543 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
544 "lsp-types 0.57.2 (registry+https://github.com/rust-lang/crates.io-index)", 544 "lsp-types 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)",
545 "serde 1.0.93 (registry+https://github.com/rust-lang/crates.io-index)", 545 "serde 1.0.93 (registry+https://github.com/rust-lang/crates.io-index)",
546 "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", 546 "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
547] 547]
@@ -774,7 +774,7 @@ dependencies = [
774 774
775[[package]] 775[[package]]
776name = "lsp-types" 776name = "lsp-types"
777version = "0.57.2" 777version = "0.58.0"
778source = "registry+https://github.com/rust-lang/crates.io-index" 778source = "registry+https://github.com/rust-lang/crates.io-index"
779dependencies = [ 779dependencies = [
780 "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 780 "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1200,7 +1200,7 @@ dependencies = [
1200 "flexi_logger 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", 1200 "flexi_logger 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)",
1201 "gen_lsp_server 0.2.0", 1201 "gen_lsp_server 0.2.0",
1202 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 1202 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
1203 "lsp-types 0.57.2 (registry+https://github.com/rust-lang/crates.io-index)", 1203 "lsp-types 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)",
1204 "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", 1204 "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
1205 "ra_arena 0.1.0", 1205 "ra_arena 0.1.0",
1206 "ra_ide_api 0.1.0", 1206 "ra_ide_api 0.1.0",
@@ -2201,7 +2201,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
2201"checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" 2201"checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83"
2202"checksum lock_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ed946d4529956a20f2d63ebe1b69996d5a2137c91913fe3ebbeff957f5bca7ff" 2202"checksum lock_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ed946d4529956a20f2d63ebe1b69996d5a2137c91913fe3ebbeff957f5bca7ff"
2203"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" 2203"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"
2204"checksum lsp-types 0.57.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b62b77309737b1e262b3bbf37ff8faa740562c633b14702afe9be85dbcb6f88a" 2204"checksum lsp-types 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4f5845bb113cdb0b809deadf83727d90a6fa1978da7ea5a32034d3ea23bd2736"
2205"checksum maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "08cbb6b4fef96b6d77bfc40ec491b1690c779e77b05cd9f07f787ed376fd4c43" 2205"checksum maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "08cbb6b4fef96b6d77bfc40ec491b1690c779e77b05cd9f07f787ed376fd4c43"
2206"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" 2206"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
2207"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39" 2207"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39"
diff --git a/crates/gen_lsp_server/Cargo.toml b/crates/gen_lsp_server/Cargo.toml
index d14bcf694..bf57df81f 100644
--- a/crates/gen_lsp_server/Cargo.toml
+++ b/crates/gen_lsp_server/Cargo.toml
@@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
8description = "Generic LSP server scaffold." 8description = "Generic LSP server scaffold."
9 9
10[dependencies] 10[dependencies]
11lsp-types = "0.57.0" 11lsp-types = "0.58.0"
12log = "0.4.3" 12log = "0.4.3"
13serde_json = "1.0.34" 13serde_json = "1.0.34"
14serde = { version = "1.0.83", features = ["derive"] } 14serde = { version = "1.0.83", features = ["derive"] }
diff --git a/crates/ra_lsp_server/Cargo.toml b/crates/ra_lsp_server/Cargo.toml
index 4491b8590..2c4b3789e 100644
--- a/crates/ra_lsp_server/Cargo.toml
+++ b/crates/ra_lsp_server/Cargo.toml
@@ -13,7 +13,7 @@ crossbeam-channel = "0.3.5"
13flexi_logger = "0.13.0" 13flexi_logger = "0.13.0"
14log = "0.4.3" 14log = "0.4.3"
15url_serde = "0.2.0" 15url_serde = "0.2.0"
16lsp-types = { version = "0.57.1", features = ["proposed"] } 16lsp-types = { version = "0.58.0", features = ["proposed"] }
17rustc-hash = "1.0" 17rustc-hash = "1.0"
18parking_lot = "0.8.0" 18parking_lot = "0.8.0"
19 19
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs
index bbbc93b1c..846991f09 100644
--- a/crates/ra_lsp_server/src/main_loop/handlers.rs
+++ b/crates/ra_lsp_server/src/main_loop/handlers.rs
@@ -2,11 +2,11 @@ use std::{fmt::Write as _, io::Write as _};
2 2
3use gen_lsp_server::ErrorCode; 3use gen_lsp_server::ErrorCode;
4use lsp_types::{ 4use lsp_types::{
5 CodeAction, CodeActionResponse, CodeLens, Command, Diagnostic, DiagnosticSeverity, 5 CodeAction, CodeActionOrCommand, CodeActionResponse, CodeLens, Command, Diagnostic,
6 DocumentFormattingParams, DocumentHighlight, DocumentSymbol, FoldingRange, FoldingRangeKind, 6 DiagnosticSeverity, DocumentFormattingParams, DocumentHighlight, DocumentSymbol, FoldingRange,
7 FoldingRangeParams, Hover, HoverContents, Location, MarkupContent, MarkupKind, Position, 7 FoldingRangeKind, FoldingRangeParams, Hover, HoverContents, Location, MarkupContent,
8 PrepareRenameResponse, Range, RenameParams, SymbolInformation, TextDocumentIdentifier, 8 MarkupKind, Position, PrepareRenameResponse, Range, RenameParams, SymbolInformation,
9 TextEdit, WorkspaceEdit, 9 TextDocumentIdentifier, TextEdit, WorkspaceEdit,
10}; 10};
11use ra_ide_api::{ 11use ra_ide_api::{
12 AssistId, Cancelable, FileId, FilePosition, FileRange, FoldKind, Query, RangeInfo, 12 AssistId, Cancelable, FileId, FilePosition, FileRange, FoldKind, Query, RangeInfo,
@@ -665,7 +665,7 @@ pub fn handle_code_action(
665 665
666 let assists = world.analysis().assists(FileRange { file_id, range })?.into_iter(); 666 let assists = world.analysis().assists(FileRange { file_id, range })?.into_iter();
667 let diagnostics = world.analysis().diagnostics(file_id)?; 667 let diagnostics = world.analysis().diagnostics(file_id)?;
668 let mut res: Vec<CodeAction> = Vec::new(); 668 let mut res = CodeActionResponse::default();
669 669
670 let fixes_from_diagnostics = diagnostics 670 let fixes_from_diagnostics = diagnostics
671 .into_iter() 671 .into_iter()
@@ -689,7 +689,7 @@ pub fn handle_code_action(
689 edit: None, 689 edit: None,
690 command: Some(command), 690 command: Some(command),
691 }; 691 };
692 res.push(action); 692 res.push(CodeActionOrCommand::CodeAction(action));
693 } 693 }
694 694
695 for assist in assists { 695 for assist in assists {
@@ -711,10 +711,10 @@ pub fn handle_code_action(
711 edit: None, 711 edit: None,
712 command: Some(command), 712 command: Some(command),
713 }; 713 };
714 res.push(action); 714 res.push(CodeActionOrCommand::CodeAction(action));
715 } 715 }
716 716
717 Ok(Some(CodeActionResponse::Actions(res))) 717 Ok(Some(res))
718} 718}
719 719
720pub fn handle_code_lens( 720pub fn handle_code_lens(