diff options
author | Seivan Heidari <[email protected]> | 2019-11-28 07:19:14 +0000 |
---|---|---|
committer | Seivan Heidari <[email protected]> | 2019-11-28 07:19:14 +0000 |
commit | 18a0937585b836ec5ed054b9ae48e0156ab6d9ef (patch) | |
tree | 9de2c0267ddcc00df717f90034d0843d751a851b /crates/ra_lsp_server | |
parent | a7394b44c870f585eacfeb3036a33471aff49ff8 (diff) | |
parent | 484acc8a61d599662ed63a4cbda091d38a982551 (diff) |
Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into feature/themes
Diffstat (limited to 'crates/ra_lsp_server')
-rw-r--r-- | crates/ra_lsp_server/Cargo.toml | 4 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/cargo_target_spec.rs | 2 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/conv.rs | 6 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/lib.rs | 2 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/main_loop.rs | 2 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/handlers.rs | 6 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/subscriptions.rs | 2 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/world.rs | 2 |
8 files changed, 13 insertions, 13 deletions
diff --git a/crates/ra_lsp_server/Cargo.toml b/crates/ra_lsp_server/Cargo.toml index 72dbe06dc..21aef842c 100644 --- a/crates/ra_lsp_server/Cargo.toml +++ b/crates/ra_lsp_server/Cargo.toml | |||
@@ -17,12 +17,12 @@ flexi_logger = "0.14.0" | |||
17 | log = "0.4.3" | 17 | log = "0.4.3" |
18 | lsp-types = { version = "0.61.0", features = ["proposed"] } | 18 | lsp-types = { version = "0.61.0", features = ["proposed"] } |
19 | rustc-hash = "1.0" | 19 | rustc-hash = "1.0" |
20 | parking_lot = "0.9.0" | 20 | parking_lot = "0.10.0" |
21 | jod-thread = "0.1.0" | 21 | jod-thread = "0.1.0" |
22 | ra_vfs = "0.5.0" | 22 | ra_vfs = "0.5.0" |
23 | ra_syntax = { path = "../ra_syntax" } | 23 | ra_syntax = { path = "../ra_syntax" } |
24 | ra_text_edit = { path = "../ra_text_edit" } | 24 | ra_text_edit = { path = "../ra_text_edit" } |
25 | ra_ide_api = { path = "../ra_ide_api" } | 25 | ra_ide = { path = "../ra_ide" } |
26 | lsp-server = "0.3.0" | 26 | lsp-server = "0.3.0" |
27 | ra_project_model = { path = "../ra_project_model" } | 27 | ra_project_model = { path = "../ra_project_model" } |
28 | ra_prof = { path = "../ra_prof" } | 28 | ra_prof = { path = "../ra_prof" } |
diff --git a/crates/ra_lsp_server/src/cargo_target_spec.rs b/crates/ra_lsp_server/src/cargo_target_spec.rs index d996b53de..c4a9e7101 100644 --- a/crates/ra_lsp_server/src/cargo_target_spec.rs +++ b/crates/ra_lsp_server/src/cargo_target_spec.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! FIXME: write short doc here |
2 | 2 | ||
3 | use ra_ide_api::{FileId, RunnableKind}; | 3 | use ra_ide::{FileId, RunnableKind}; |
4 | use ra_project_model::{self, ProjectWorkspace, TargetKind}; | 4 | use ra_project_model::{self, ProjectWorkspace, TargetKind}; |
5 | 5 | ||
6 | use crate::{world::WorldSnapshot, Result}; | 6 | use crate::{world::WorldSnapshot, Result}; |
diff --git a/crates/ra_lsp_server/src/conv.rs b/crates/ra_lsp_server/src/conv.rs index 94ed619fa..b13093cfe 100644 --- a/crates/ra_lsp_server/src/conv.rs +++ b/crates/ra_lsp_server/src/conv.rs | |||
@@ -6,7 +6,7 @@ use lsp_types::{ | |||
6 | SymbolKind, TextDocumentEdit, TextDocumentIdentifier, TextDocumentItem, | 6 | SymbolKind, TextDocumentEdit, TextDocumentIdentifier, TextDocumentItem, |
7 | TextDocumentPositionParams, Url, VersionedTextDocumentIdentifier, WorkspaceEdit, | 7 | TextDocumentPositionParams, Url, VersionedTextDocumentIdentifier, WorkspaceEdit, |
8 | }; | 8 | }; |
9 | use ra_ide_api::{ | 9 | use ra_ide::{ |
10 | translate_offset_with_edit, CompletionItem, CompletionItemKind, FileId, FilePosition, | 10 | translate_offset_with_edit, CompletionItem, CompletionItemKind, FileId, FilePosition, |
11 | FileRange, FileSystemEdit, Fold, FoldKind, InsertTextFormat, LineCol, LineIndex, | 11 | FileRange, FileSystemEdit, Fold, FoldKind, InsertTextFormat, LineCol, LineIndex, |
12 | NavigationTarget, RangeInfo, Severity, SourceChange, SourceFileEdit, | 12 | NavigationTarget, RangeInfo, Severity, SourceChange, SourceFileEdit, |
@@ -173,7 +173,7 @@ impl ConvWith<&LineIndex> for Range { | |||
173 | } | 173 | } |
174 | } | 174 | } |
175 | 175 | ||
176 | impl Conv for ra_ide_api::Documentation { | 176 | impl Conv for ra_ide::Documentation { |
177 | type Output = lsp_types::Documentation; | 177 | type Output = lsp_types::Documentation; |
178 | fn conv(self) -> Documentation { | 178 | fn conv(self) -> Documentation { |
179 | Documentation::MarkupContent(MarkupContent { | 179 | Documentation::MarkupContent(MarkupContent { |
@@ -183,7 +183,7 @@ impl Conv for ra_ide_api::Documentation { | |||
183 | } | 183 | } |
184 | } | 184 | } |
185 | 185 | ||
186 | impl Conv for ra_ide_api::FunctionSignature { | 186 | impl Conv for ra_ide::FunctionSignature { |
187 | type Output = lsp_types::SignatureInformation; | 187 | type Output = lsp_types::SignatureInformation; |
188 | fn conv(self) -> Self::Output { | 188 | fn conv(self) -> Self::Output { |
189 | use lsp_types::{ParameterInformation, ParameterLabel, SignatureInformation}; | 189 | use lsp_types::{ParameterInformation, ParameterLabel, SignatureInformation}; |
diff --git a/crates/ra_lsp_server/src/lib.rs b/crates/ra_lsp_server/src/lib.rs index 9c36402b0..2ca149fd5 100644 --- a/crates/ra_lsp_server/src/lib.rs +++ b/crates/ra_lsp_server/src/lib.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | //! Implementation of the LSP for rust-analyzer. | 1 | //! Implementation of the LSP for rust-analyzer. |
2 | //! | 2 | //! |
3 | //! This crate takes Rust-specific analysis results from ra_ide_api and | 3 | //! This crate takes Rust-specific analysis results from ra_ide and |
4 | //! translates into LSP types. | 4 | //! translates into LSP types. |
5 | //! | 5 | //! |
6 | //! It also is the root of all state. `world` module defines the bulk of the | 6 | //! It also is the root of all state. `world` module defines the bulk of the |
diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs index 0dc0aeee8..83845f1e0 100644 --- a/crates/ra_lsp_server/src/main_loop.rs +++ b/crates/ra_lsp_server/src/main_loop.rs | |||
@@ -9,7 +9,7 @@ use std::{error::Error, fmt, panic, path::PathBuf, sync::Arc, time::Instant}; | |||
9 | use crossbeam_channel::{select, unbounded, RecvError, Sender}; | 9 | use crossbeam_channel::{select, unbounded, RecvError, Sender}; |
10 | use lsp_server::{Connection, ErrorCode, Message, Notification, Request, RequestId, Response}; | 10 | use lsp_server::{Connection, ErrorCode, Message, Notification, Request, RequestId, Response}; |
11 | use lsp_types::{ClientCapabilities, NumberOrString}; | 11 | use lsp_types::{ClientCapabilities, NumberOrString}; |
12 | use ra_ide_api::{Canceled, FeatureFlags, FileId, LibraryData, SourceRootId}; | 12 | use ra_ide::{Canceled, FeatureFlags, FileId, LibraryData, SourceRootId}; |
13 | use ra_prof::profile; | 13 | use ra_prof::profile; |
14 | use ra_vfs::{VfsTask, Watch}; | 14 | use ra_vfs::{VfsTask, Watch}; |
15 | use relative_path::RelativePathBuf; | 15 | use relative_path::RelativePathBuf; |
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index e552f2106..c81fa7f67 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs | |||
@@ -9,7 +9,7 @@ use lsp_types::{ | |||
9 | Hover, HoverContents, Location, MarkupContent, MarkupKind, Position, PrepareRenameResponse, | 9 | Hover, HoverContents, Location, MarkupContent, MarkupKind, Position, PrepareRenameResponse, |
10 | Range, RenameParams, SymbolInformation, TextDocumentIdentifier, TextEdit, WorkspaceEdit, | 10 | Range, RenameParams, SymbolInformation, TextDocumentIdentifier, TextEdit, WorkspaceEdit, |
11 | }; | 11 | }; |
12 | use ra_ide_api::{ | 12 | use ra_ide::{ |
13 | AssistId, FileId, FilePosition, FileRange, Query, Runnable, RunnableKind, SearchScope, | 13 | AssistId, FileId, FilePosition, FileRange, Query, Runnable, RunnableKind, SearchScope, |
14 | }; | 14 | }; |
15 | use ra_prof::profile; | 15 | use ra_prof::profile; |
@@ -162,7 +162,7 @@ pub fn handle_on_type_formatting( | |||
162 | let line_index = world.analysis().file_line_index(position.file_id)?; | 162 | let line_index = world.analysis().file_line_index(position.file_id)?; |
163 | let line_endings = world.file_line_endings(position.file_id); | 163 | let line_endings = world.file_line_endings(position.file_id); |
164 | 164 | ||
165 | // in `ra_ide_api`, the `on_type` invariant is that | 165 | // in `ra_ide`, the `on_type` invariant is that |
166 | // `text.char_at(position) == typed_char`. | 166 | // `text.char_at(position) == typed_char`. |
167 | position.offset = position.offset - TextUnit::of_char('.'); | 167 | position.offset = position.offset - TextUnit::of_char('.'); |
168 | let char_typed = params.ch.chars().next().unwrap_or('\0'); | 168 | let char_typed = params.ch.chars().next().unwrap_or('\0'); |
@@ -894,7 +894,7 @@ pub fn handle_inlay_hints( | |||
894 | label: api_type.label.to_string(), | 894 | label: api_type.label.to_string(), |
895 | range: api_type.range.conv_with(&line_index), | 895 | range: api_type.range.conv_with(&line_index), |
896 | kind: match api_type.kind { | 896 | kind: match api_type.kind { |
897 | ra_ide_api::InlayKind::TypeHint => InlayKind::TypeHint, | 897 | ra_ide::InlayKind::TypeHint => InlayKind::TypeHint, |
898 | }, | 898 | }, |
899 | }) | 899 | }) |
900 | .collect()) | 900 | .collect()) |
diff --git a/crates/ra_lsp_server/src/main_loop/subscriptions.rs b/crates/ra_lsp_server/src/main_loop/subscriptions.rs index 3856263b0..609b2adcc 100644 --- a/crates/ra_lsp_server/src/main_loop/subscriptions.rs +++ b/crates/ra_lsp_server/src/main_loop/subscriptions.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! FIXME: write short doc here |
2 | 2 | ||
3 | use ra_ide_api::FileId; | 3 | use ra_ide::FileId; |
4 | use rustc_hash::FxHashSet; | 4 | use rustc_hash::FxHashSet; |
5 | 5 | ||
6 | #[derive(Default, Debug)] | 6 | #[derive(Default, Debug)] |
diff --git a/crates/ra_lsp_server/src/world.rs b/crates/ra_lsp_server/src/world.rs index 9bdea70c7..927449b45 100644 --- a/crates/ra_lsp_server/src/world.rs +++ b/crates/ra_lsp_server/src/world.rs | |||
@@ -9,7 +9,7 @@ use crossbeam_channel::{unbounded, Receiver}; | |||
9 | use lsp_server::ErrorCode; | 9 | use lsp_server::ErrorCode; |
10 | use lsp_types::Url; | 10 | use lsp_types::Url; |
11 | use parking_lot::RwLock; | 11 | use parking_lot::RwLock; |
12 | use ra_ide_api::{ | 12 | use ra_ide::{ |
13 | Analysis, AnalysisChange, AnalysisHost, CrateGraph, FeatureFlags, FileId, LibraryData, | 13 | Analysis, AnalysisChange, AnalysisHost, CrateGraph, FeatureFlags, FileId, LibraryData, |
14 | SourceRootId, | 14 | SourceRootId, |
15 | }; | 15 | }; |