diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/gen_lsp_server/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/gen_lsp_server/src/lib.rs | 6 | ||||
-rw-r--r-- | crates/gen_lsp_server/src/msg.rs | 2 | ||||
-rw-r--r-- | crates/ra_lsp_server/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/caps.rs | 2 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/conv.rs | 30 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/main_loop.rs | 2 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/handlers.rs | 2 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/req.rs | 4 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/server_world.rs | 2 | ||||
-rw-r--r-- | crates/ra_lsp_server/tests/heavy_tests/main.rs | 2 | ||||
-rw-r--r-- | crates/ra_lsp_server/tests/heavy_tests/support.rs | 2 |
12 files changed, 29 insertions, 29 deletions
diff --git a/crates/gen_lsp_server/Cargo.toml b/crates/gen_lsp_server/Cargo.toml index a421a3e0b..041151741 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" | |||
8 | description = "Generic LSP server scaffold." | 8 | description = "Generic LSP server scaffold." |
9 | 9 | ||
10 | [dependencies] | 10 | [dependencies] |
11 | languageserver-types = "0.53.1" | 11 | lsp-types = "0.54.0" |
12 | log = "0.4.3" | 12 | log = "0.4.3" |
13 | failure = "0.1.4" | 13 | failure = "0.1.4" |
14 | serde_json = "1.0.34" | 14 | serde_json = "1.0.34" |
diff --git a/crates/gen_lsp_server/src/lib.rs b/crates/gen_lsp_server/src/lib.rs index 16ac799ac..edbdda6c8 100644 --- a/crates/gen_lsp_server/src/lib.rs +++ b/crates/gen_lsp_server/src/lib.rs | |||
@@ -6,12 +6,12 @@ | |||
6 | //! | 6 | //! |
7 | //! ```no_run | 7 | //! ```no_run |
8 | //! extern crate gen_lsp_server; | 8 | //! extern crate gen_lsp_server; |
9 | //! extern crate languageserver_types; | 9 | //! extern crate lsp_types; |
10 | //! extern crate failure; | 10 | //! extern crate failure; |
11 | //! extern crate crossbeam_channel; | 11 | //! extern crate crossbeam_channel; |
12 | //! | 12 | //! |
13 | //! use crossbeam_channel::{Sender, Receiver}; | 13 | //! use crossbeam_channel::{Sender, Receiver}; |
14 | //! use languageserver_types::{ServerCapabilities, InitializeParams, request::{GotoDefinition, GotoDefinitionResponse}}; | 14 | //! use lsp_types::{ServerCapabilities, InitializeParams, request::{GotoDefinition, GotoDefinitionResponse}}; |
15 | //! use gen_lsp_server::{run_server, stdio_transport, handle_shutdown, RawMessage, RawResponse}; | 15 | //! use gen_lsp_server::{run_server, stdio_transport, handle_shutdown, RawMessage, RawResponse}; |
16 | //! | 16 | //! |
17 | //! fn main() -> Result<(), failure::Error> { | 17 | //! fn main() -> Result<(), failure::Error> { |
@@ -65,7 +65,7 @@ mod msg; | |||
65 | mod stdio; | 65 | mod stdio; |
66 | 66 | ||
67 | use crossbeam_channel::{Receiver, Sender}; | 67 | use crossbeam_channel::{Receiver, Sender}; |
68 | use languageserver_types::{ | 68 | use lsp_types::{ |
69 | notification::{Exit, Initialized}, | 69 | notification::{Exit, Initialized}, |
70 | request::{Initialize, Shutdown}, | 70 | request::{Initialize, Shutdown}, |
71 | InitializeParams, InitializeResult, ServerCapabilities, | 71 | InitializeParams, InitializeResult, ServerCapabilities, |
diff --git a/crates/gen_lsp_server/src/msg.rs b/crates/gen_lsp_server/src/msg.rs index 94bef374c..818111fe7 100644 --- a/crates/gen_lsp_server/src/msg.rs +++ b/crates/gen_lsp_server/src/msg.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | use std::io::{BufRead, Write}; | 1 | use std::io::{BufRead, Write}; |
2 | 2 | ||
3 | use languageserver_types::{notification::Notification, request::Request}; | 3 | use lsp_types::{notification::Notification, request::Request}; |
4 | use serde::{Deserialize, Serialize}; | 4 | use serde::{Deserialize, Serialize}; |
5 | use serde_json::{from_str, from_value, to_string, to_value, Value}; | 5 | use serde_json::{from_str, from_value, to_string, to_value, Value}; |
6 | use failure::{bail, format_err}; | 6 | use failure::{bail, format_err}; |
diff --git a/crates/ra_lsp_server/Cargo.toml b/crates/ra_lsp_server/Cargo.toml index 7e307eb1c..0557897fd 100644 --- a/crates/ra_lsp_server/Cargo.toml +++ b/crates/ra_lsp_server/Cargo.toml | |||
@@ -17,7 +17,7 @@ crossbeam-channel = "0.3.5" | |||
17 | flexi_logger = "0.10.0" | 17 | flexi_logger = "0.10.0" |
18 | log = "0.4.3" | 18 | log = "0.4.3" |
19 | url_serde = "0.2.0" | 19 | url_serde = "0.2.0" |
20 | languageserver-types = "0.53.1" | 20 | lsp-types = "0.54.0" |
21 | walkdir = "2.2.7" | 21 | walkdir = "2.2.7" |
22 | im = "12.0.0" | 22 | im = "12.0.0" |
23 | cargo_metadata = "0.6.0" | 23 | cargo_metadata = "0.6.0" |
diff --git a/crates/ra_lsp_server/src/caps.rs b/crates/ra_lsp_server/src/caps.rs index be6a6ead6..bca079d65 100644 --- a/crates/ra_lsp_server/src/caps.rs +++ b/crates/ra_lsp_server/src/caps.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | use languageserver_types::{ | 1 | use lsp_types::{ |
2 | CodeActionProviderCapability, CodeLensOptions, CompletionOptions, DocumentOnTypeFormattingOptions, | 2 | CodeActionProviderCapability, CodeLensOptions, CompletionOptions, DocumentOnTypeFormattingOptions, |
3 | ExecuteCommandOptions, FoldingRangeProviderCapability, RenameOptions, RenameProviderCapability, | 3 | ExecuteCommandOptions, FoldingRangeProviderCapability, RenameOptions, RenameProviderCapability, |
4 | ServerCapabilities, SignatureHelpOptions, TextDocumentSyncCapability, TextDocumentSyncKind, | 4 | ServerCapabilities, SignatureHelpOptions, TextDocumentSyncCapability, TextDocumentSyncKind, |
diff --git a/crates/ra_lsp_server/src/conv.rs b/crates/ra_lsp_server/src/conv.rs index 687663d8a..6e187d49e 100644 --- a/crates/ra_lsp_server/src/conv.rs +++ b/crates/ra_lsp_server/src/conv.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | use languageserver_types::{ | 1 | use lsp_types::{ |
2 | self, CreateFile, DocumentChangeOperation, DocumentChanges, InsertTextFormat, Location, LocationLink, | 2 | self, CreateFile, DocumentChangeOperation, DocumentChanges, InsertTextFormat, Location, LocationLink, |
3 | Position, Range, RenameFile, ResourceOp, SymbolKind, TextDocumentEdit, TextDocumentIdentifier, | 3 | Position, Range, RenameFile, ResourceOp, SymbolKind, TextDocumentEdit, TextDocumentIdentifier, |
4 | TextDocumentItem, TextDocumentPositionParams, Url, VersionedTextDocumentIdentifier, | 4 | TextDocumentItem, TextDocumentPositionParams, Url, VersionedTextDocumentIdentifier, |
@@ -51,10 +51,10 @@ impl Conv for SyntaxKind { | |||
51 | } | 51 | } |
52 | 52 | ||
53 | impl Conv for CompletionItemKind { | 53 | impl Conv for CompletionItemKind { |
54 | type Output = ::languageserver_types::CompletionItemKind; | 54 | type Output = ::lsp_types::CompletionItemKind; |
55 | 55 | ||
56 | fn conv(self) -> <Self as Conv>::Output { | 56 | fn conv(self) -> <Self as Conv>::Output { |
57 | use languageserver_types::CompletionItemKind::*; | 57 | use lsp_types::CompletionItemKind::*; |
58 | match self { | 58 | match self { |
59 | CompletionItemKind::Keyword => Keyword, | 59 | CompletionItemKind::Keyword => Keyword, |
60 | CompletionItemKind::Snippet => Snippet, | 60 | CompletionItemKind::Snippet => Snippet, |
@@ -75,10 +75,10 @@ impl Conv for CompletionItemKind { | |||
75 | } | 75 | } |
76 | 76 | ||
77 | impl Conv for CompletionItem { | 77 | impl Conv for CompletionItem { |
78 | type Output = ::languageserver_types::CompletionItem; | 78 | type Output = ::lsp_types::CompletionItem; |
79 | 79 | ||
80 | fn conv(self) -> <Self as Conv>::Output { | 80 | fn conv(self) -> <Self as Conv>::Output { |
81 | let mut res = ::languageserver_types::CompletionItem { | 81 | let mut res = ::lsp_types::CompletionItem { |
82 | label: self.label().to_string(), | 82 | label: self.label().to_string(), |
83 | detail: self.detail().map(|it| it.to_string()), | 83 | detail: self.detail().map(|it| it.to_string()), |
84 | filter_text: Some(self.lookup().to_string()), | 84 | filter_text: Some(self.lookup().to_string()), |
@@ -148,9 +148,9 @@ impl ConvWith for Range { | |||
148 | 148 | ||
149 | impl ConvWith for TextEdit { | 149 | impl ConvWith for TextEdit { |
150 | type Ctx = LineIndex; | 150 | type Ctx = LineIndex; |
151 | type Output = Vec<languageserver_types::TextEdit>; | 151 | type Output = Vec<lsp_types::TextEdit>; |
152 | 152 | ||
153 | fn conv_with(self, line_index: &LineIndex) -> Vec<languageserver_types::TextEdit> { | 153 | fn conv_with(self, line_index: &LineIndex) -> Vec<lsp_types::TextEdit> { |
154 | self.as_atoms() | 154 | self.as_atoms() |
155 | .into_iter() | 155 | .into_iter() |
156 | .map_conv_with(line_index) | 156 | .map_conv_with(line_index) |
@@ -160,10 +160,10 @@ impl ConvWith for TextEdit { | |||
160 | 160 | ||
161 | impl<'a> ConvWith for &'a AtomTextEdit { | 161 | impl<'a> ConvWith for &'a AtomTextEdit { |
162 | type Ctx = LineIndex; | 162 | type Ctx = LineIndex; |
163 | type Output = languageserver_types::TextEdit; | 163 | type Output = lsp_types::TextEdit; |
164 | 164 | ||
165 | fn conv_with(self, line_index: &LineIndex) -> languageserver_types::TextEdit { | 165 | fn conv_with(self, line_index: &LineIndex) -> lsp_types::TextEdit { |
166 | languageserver_types::TextEdit { | 166 | lsp_types::TextEdit { |
167 | range: self.delete.conv_with(line_index), | 167 | range: self.delete.conv_with(line_index), |
168 | new_text: self.insert.clone(), | 168 | new_text: self.insert.clone(), |
169 | } | 169 | } |
@@ -324,7 +324,7 @@ impl TryConvWith for FileSystemEdit { | |||
324 | fn try_conv_with(self, world: &ServerWorld) -> Result<ResourceOp> { | 324 | fn try_conv_with(self, world: &ServerWorld) -> Result<ResourceOp> { |
325 | let res = match self { | 325 | let res = match self { |
326 | FileSystemEdit::CreateFile { source_root, path } => { | 326 | FileSystemEdit::CreateFile { source_root, path } => { |
327 | let uri = world.path_to_uri(source_root, &path)?.to_string(); | 327 | let uri = world.path_to_uri(source_root, &path)?; |
328 | ResourceOp::Create(CreateFile { uri, options: None }) | 328 | ResourceOp::Create(CreateFile { uri, options: None }) |
329 | } | 329 | } |
330 | FileSystemEdit::MoveFile { | 330 | FileSystemEdit::MoveFile { |
@@ -332,8 +332,8 @@ impl TryConvWith for FileSystemEdit { | |||
332 | dst_source_root, | 332 | dst_source_root, |
333 | dst_path, | 333 | dst_path, |
334 | } => { | 334 | } => { |
335 | let old_uri = world.file_id_to_uri(src)?.to_string(); | 335 | let old_uri = world.file_id_to_uri(src)?; |
336 | let new_uri = world.path_to_uri(dst_source_root, &dst_path)?.to_string(); | 336 | let new_uri = world.path_to_uri(dst_source_root, &dst_path)?; |
337 | ResourceOp::Rename(RenameFile { | 337 | ResourceOp::Rename(RenameFile { |
338 | old_uri, | 338 | old_uri, |
339 | new_uri, | 339 | new_uri, |
@@ -361,7 +361,7 @@ pub fn to_location_link( | |||
361 | // line index for original range file | 361 | // line index for original range file |
362 | line_index: &LineIndex, | 362 | line_index: &LineIndex, |
363 | ) -> Result<LocationLink> { | 363 | ) -> Result<LocationLink> { |
364 | let url = target.info.file_id().try_conv_with(world)?; | 364 | let target_uri = target.info.file_id().try_conv_with(world)?; |
365 | let tgt_line_index = world.analysis().file_line_index(target.info.file_id()); | 365 | let tgt_line_index = world.analysis().file_line_index(target.info.file_id()); |
366 | 366 | ||
367 | let target_range = target.info.full_range().conv_with(&tgt_line_index); | 367 | let target_range = target.info.full_range().conv_with(&tgt_line_index); |
@@ -374,7 +374,7 @@ pub fn to_location_link( | |||
374 | 374 | ||
375 | let res = LocationLink { | 375 | let res = LocationLink { |
376 | origin_selection_range: Some(target.range.conv_with(line_index)), | 376 | origin_selection_range: Some(target.range.conv_with(line_index)), |
377 | target_uri: url.to_string(), | 377 | target_uri, |
378 | target_range, | 378 | target_range, |
379 | target_selection_range: Some(target_selection_range), | 379 | target_selection_range: Some(target_selection_range), |
380 | }; | 380 | }; |
diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs index 03c834dbc..19fd294e0 100644 --- a/crates/ra_lsp_server/src/main_loop.rs +++ b/crates/ra_lsp_server/src/main_loop.rs | |||
@@ -9,7 +9,7 @@ use failure_derive::Fail; | |||
9 | use gen_lsp_server::{ | 9 | use gen_lsp_server::{ |
10 | handle_shutdown, ErrorCode, RawMessage, RawNotification, RawRequest, RawResponse, | 10 | handle_shutdown, ErrorCode, RawMessage, RawNotification, RawRequest, RawResponse, |
11 | }; | 11 | }; |
12 | use languageserver_types::NumberOrString; | 12 | use lsp_types::NumberOrString; |
13 | use ra_ide_api::{Canceled, FileId, LibraryData}; | 13 | use ra_ide_api::{Canceled, FileId, LibraryData}; |
14 | use ra_vfs::VfsTask; | 14 | use ra_vfs::VfsTask; |
15 | use rayon; | 15 | use rayon; |
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index 7326a727d..11a705200 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | use std::collections::HashMap; | 1 | use std::collections::HashMap; |
2 | 2 | ||
3 | use gen_lsp_server::ErrorCode; | 3 | use gen_lsp_server::ErrorCode; |
4 | use languageserver_types::{ | 4 | use lsp_types::{ |
5 | CodeActionResponse, CodeLens, Command, Diagnostic, DiagnosticSeverity, | 5 | CodeActionResponse, CodeLens, Command, Diagnostic, DiagnosticSeverity, |
6 | DocumentFormattingParams, DocumentHighlight, DocumentSymbol, Documentation, FoldingRange, | 6 | DocumentFormattingParams, DocumentHighlight, DocumentSymbol, Documentation, FoldingRange, |
7 | FoldingRangeKind, FoldingRangeParams, Hover, HoverContents, Location, MarkupContent, | 7 | FoldingRangeKind, FoldingRangeParams, Hover, HoverContents, Location, MarkupContent, |
diff --git a/crates/ra_lsp_server/src/req.rs b/crates/ra_lsp_server/src/req.rs index c2b16725b..156cf9641 100644 --- a/crates/ra_lsp_server/src/req.rs +++ b/crates/ra_lsp_server/src/req.rs | |||
@@ -1,9 +1,9 @@ | |||
1 | use languageserver_types::{Location, Position, Range, TextDocumentIdentifier, Url}; | 1 | use lsp_types::{Location, Position, Range, TextDocumentIdentifier, Url}; |
2 | use rustc_hash::FxHashMap; | 2 | use rustc_hash::FxHashMap; |
3 | use serde::{Deserialize, Serialize}; | 3 | use serde::{Deserialize, Serialize}; |
4 | use url_serde; | 4 | use url_serde; |
5 | 5 | ||
6 | pub use languageserver_types::{ | 6 | pub use lsp_types::{ |
7 | notification::*, request::*, ApplyWorkspaceEditParams, CodeActionParams, CodeLens, CodeLensParams, | 7 | notification::*, request::*, ApplyWorkspaceEditParams, CodeActionParams, CodeLens, CodeLensParams, |
8 | CompletionParams, CompletionResponse, DocumentOnTypeFormattingParams, DocumentSymbolParams, | 8 | CompletionParams, CompletionResponse, DocumentOnTypeFormattingParams, DocumentSymbolParams, |
9 | DocumentSymbolResponse, ExecuteCommandParams, Hover, InitializeResult, | 9 | DocumentSymbolResponse, ExecuteCommandParams, Hover, InitializeResult, |
diff --git a/crates/ra_lsp_server/src/server_world.rs b/crates/ra_lsp_server/src/server_world.rs index d5dbf999f..c24ded9f9 100644 --- a/crates/ra_lsp_server/src/server_world.rs +++ b/crates/ra_lsp_server/src/server_world.rs | |||
@@ -3,7 +3,7 @@ use std::{ | |||
3 | sync::Arc, | 3 | sync::Arc, |
4 | }; | 4 | }; |
5 | 5 | ||
6 | use languageserver_types::Url; | 6 | use lsp_types::Url; |
7 | use ra_ide_api::{ | 7 | use ra_ide_api::{ |
8 | Analysis, AnalysisChange, AnalysisHost, CrateGraph, FileId, LibraryData, | 8 | Analysis, AnalysisChange, AnalysisHost, CrateGraph, FileId, LibraryData, |
9 | SourceRootId | 9 | SourceRootId |
diff --git a/crates/ra_lsp_server/tests/heavy_tests/main.rs b/crates/ra_lsp_server/tests/heavy_tests/main.rs index 02d62a259..8b5c43a09 100644 --- a/crates/ra_lsp_server/tests/heavy_tests/main.rs +++ b/crates/ra_lsp_server/tests/heavy_tests/main.rs | |||
@@ -5,7 +5,7 @@ use std::{ | |||
5 | time::Instant, | 5 | time::Instant, |
6 | }; | 6 | }; |
7 | 7 | ||
8 | use languageserver_types::{ | 8 | use lsp_types::{ |
9 | CodeActionContext, DocumentFormattingParams, FormattingOptions, Position, Range, | 9 | CodeActionContext, DocumentFormattingParams, FormattingOptions, Position, Range, |
10 | }; | 10 | }; |
11 | use ra_lsp_server::req::{ | 11 | use ra_lsp_server::req::{ |
diff --git a/crates/ra_lsp_server/tests/heavy_tests/support.rs b/crates/ra_lsp_server/tests/heavy_tests/support.rs index 46107b6b6..57a8b4f4d 100644 --- a/crates/ra_lsp_server/tests/heavy_tests/support.rs +++ b/crates/ra_lsp_server/tests/heavy_tests/support.rs | |||
@@ -9,7 +9,7 @@ use std::{ | |||
9 | use crossbeam_channel::{after, select, Receiver}; | 9 | use crossbeam_channel::{after, select, Receiver}; |
10 | use flexi_logger::Logger; | 10 | use flexi_logger::Logger; |
11 | use gen_lsp_server::{RawMessage, RawNotification, RawRequest}; | 11 | use gen_lsp_server::{RawMessage, RawNotification, RawRequest}; |
12 | use languageserver_types::{ | 12 | use lsp_types::{ |
13 | notification::DidOpenTextDocument, | 13 | notification::DidOpenTextDocument, |
14 | request::{Request, Shutdown}, | 14 | request::{Request, Shutdown}, |
15 | DidOpenTextDocumentParams, TextDocumentIdentifier, TextDocumentItem, Url, | 15 | DidOpenTextDocumentParams, TextDocumentIdentifier, TextDocumentItem, Url, |