aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server/src')
-rw-r--r--crates/ra_lsp_server/src/cargo_target_spec.rs2
-rw-r--r--crates/ra_lsp_server/src/conv.rs6
-rw-r--r--crates/ra_lsp_server/src/lib.rs2
-rw-r--r--crates/ra_lsp_server/src/main_loop.rs2
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs6
-rw-r--r--crates/ra_lsp_server/src/main_loop/subscriptions.rs2
-rw-r--r--crates/ra_lsp_server/src/world.rs2
7 files changed, 11 insertions, 11 deletions
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
3use ra_ide_api::{FileId, RunnableKind}; 3use ra_ide::{FileId, RunnableKind};
4use ra_project_model::{self, ProjectWorkspace, TargetKind}; 4use ra_project_model::{self, ProjectWorkspace, TargetKind};
5 5
6use crate::{world::WorldSnapshot, Result}; 6use 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};
9use ra_ide_api::{ 9use 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
176impl Conv for ra_ide_api::Documentation { 176impl 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
186impl Conv for ra_ide_api::FunctionSignature { 186impl 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};
9use crossbeam_channel::{select, unbounded, RecvError, Sender}; 9use crossbeam_channel::{select, unbounded, RecvError, Sender};
10use lsp_server::{Connection, ErrorCode, Message, Notification, Request, RequestId, Response}; 10use lsp_server::{Connection, ErrorCode, Message, Notification, Request, RequestId, Response};
11use lsp_types::{ClientCapabilities, NumberOrString}; 11use lsp_types::{ClientCapabilities, NumberOrString};
12use ra_ide_api::{Canceled, FeatureFlags, FileId, LibraryData, SourceRootId}; 12use ra_ide::{Canceled, FeatureFlags, FileId, LibraryData, SourceRootId};
13use ra_prof::profile; 13use ra_prof::profile;
14use ra_vfs::{VfsTask, Watch}; 14use ra_vfs::{VfsTask, Watch};
15use relative_path::RelativePathBuf; 15use 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};
12use ra_ide_api::{ 12use ra_ide::{
13 AssistId, FileId, FilePosition, FileRange, Query, Runnable, RunnableKind, SearchScope, 13 AssistId, FileId, FilePosition, FileRange, Query, Runnable, RunnableKind, SearchScope,
14}; 14};
15use ra_prof::profile; 15use 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
3use ra_ide_api::FileId; 3use ra_ide::FileId;
4use rustc_hash::FxHashSet; 4use 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};
9use lsp_server::ErrorCode; 9use lsp_server::ErrorCode;
10use lsp_types::Url; 10use lsp_types::Url;
11use parking_lot::RwLock; 11use parking_lot::RwLock;
12use ra_ide_api::{ 12use ra_ide::{
13 Analysis, AnalysisChange, AnalysisHost, CrateGraph, FeatureFlags, FileId, LibraryData, 13 Analysis, AnalysisChange, AnalysisHost, CrateGraph, FeatureFlags, FileId, LibraryData,
14 SourceRootId, 14 SourceRootId,
15}; 15};