Rename ra_ide -> ide

This commit is contained in:
Aleksey Kladov
2020-08-13 17:42:52 +02:00
parent fc34403018
commit 1b0c7701cc
96 changed files with 122 additions and 125 deletions

View File

@@ -1,8 +1,8 @@
//! See `CargoTargetSpec`
use cfg::CfgExpr;
use ide::{FileId, RunnableKind, TestId};
use project_model::{self, TargetKind};
use ra_ide::{FileId, RunnableKind, TestId};
use vfs::AbsPathBuf;
use crate::{global_state::GlobalStateSnapshot, Result};

View File

@@ -10,7 +10,7 @@ mod ssr;
use std::io::Read;
use anyhow::Result;
use ra_ide::Analysis;
use ide::Analysis;
use syntax::{AstNode, SourceFile};
pub use self::{

View File

@@ -7,7 +7,7 @@ use base_db::{
salsa::{Database, Durability},
FileId,
};
use ra_ide::{Analysis, AnalysisChange, AnalysisHost, CompletionConfig, FilePosition, LineCol};
use ide::{Analysis, AnalysisChange, AnalysisHost, CompletionConfig, FilePosition, LineCol};
use vfs::AbsPathBuf;
use crate::{

View File

@@ -8,7 +8,7 @@ use rustc_hash::FxHashSet;
use base_db::SourceDatabaseExt;
use hir::Crate;
use ra_ide::Severity;
use ide::Severity;
use crate::cli::{load_cargo::load_cargo, Result};

View File

@@ -5,8 +5,8 @@ use std::{path::Path, sync::Arc};
use anyhow::Result;
use base_db::CrateGraph;
use crossbeam_channel::{unbounded, Receiver};
use ide::{AnalysisChange, AnalysisHost};
use project_model::{CargoConfig, ProcMacroClient, ProjectManifest, ProjectWorkspace};
use ra_ide::{AnalysisChange, AnalysisHost};
use vfs::{loader::Handle, AbsPath, AbsPathBuf};
use crate::reload::{ProjectFolders, SourceRootConfig};

View File

@@ -10,9 +10,9 @@
use std::{ffi::OsString, path::PathBuf};
use flycheck::FlycheckConfig;
use ide::{AssistConfig, CompletionConfig, HoverConfig, InlayHintsConfig};
use lsp_types::ClientCapabilities;
use project_model::{CargoConfig, ProjectJson, ProjectJsonData, ProjectManifest};
use ra_ide::{AssistConfig, CompletionConfig, HoverConfig, InlayHintsConfig};
use serde::Deserialize;
use vfs::AbsPathBuf;

View File

@@ -3,7 +3,7 @@ pub(crate) mod to_proto;
use std::{mem, sync::Arc};
use ra_ide::FileId;
use ide::FileId;
use rustc_hash::{FxHashMap, FxHashSet};
use crate::lsp_ext;

View File

@@ -2,7 +2,7 @@
use std::convert::TryFrom;
use base_db::{FileId, FilePosition, FileRange};
use ra_ide::{AssistKind, LineCol, LineIndex};
use ide::{AssistKind, LineCol, LineIndex};
use syntax::{TextRange, TextSize};
use vfs::AbsPathBuf;

View File

@@ -8,10 +8,10 @@ use std::{sync::Arc, time::Instant};
use base_db::{CrateId, VfsPath};
use crossbeam_channel::{unbounded, Receiver, Sender};
use flycheck::FlycheckHandle;
use ide::{Analysis, AnalysisChange, AnalysisHost, FileId};
use lsp_types::{SemanticTokens, Url};
use parking_lot::{Mutex, RwLock};
use project_model::{CargoWorkspace, ProcMacroClient, ProjectWorkspace, Target};
use ra_ide::{Analysis, AnalysisChange, AnalysisHost, FileId};
use rustc_hash::FxHashMap;
use crate::{

View File

@@ -1,12 +1,16 @@
//! This module is responsible for implementing handlers for Language Server
//! Protocol. The majority of requests are fulfilled by calling into the
//! `ra_ide` crate.
//! `ide` crate.
use std::{
io::Write as _,
process::{self, Stdio},
};
use ide::{
FileId, FilePosition, FileRange, HoverAction, HoverGotoTypeData, NavigationTarget, Query,
RangeInfo, Runnable, RunnableKind, SearchScope, TextEdit,
};
use lsp_server::ErrorCode;
use lsp_types::{
CallHierarchyIncomingCall, CallHierarchyIncomingCallsParams, CallHierarchyItem,
@@ -19,10 +23,6 @@ use lsp_types::{
TextDocumentIdentifier, Url, WorkspaceEdit,
};
use project_model::TargetKind;
use ra_ide::{
FileId, FilePosition, FileRange, HoverAction, HoverGotoTypeData, NavigationTarget, Query,
RangeInfo, Runnable, RunnableKind, SearchScope, TextEdit,
};
use serde::{Deserialize, Serialize};
use serde_json::to_value;
use stdx::{format_to, split_once};
@@ -212,7 +212,7 @@ pub(crate) fn handle_on_type_formatting(
let line_index = snap.analysis.file_line_index(position.file_id)?;
let line_endings = snap.file_line_endings(position.file_id);
// in `ra_ide`, the `on_type` invariant is that
// in `ide`, the `on_type` invariant is that
// `text.char_at(position) == typed_char`.
position.offset -= TextSize::of('.');
let char_typed = params.ch.chars().next().unwrap_or('\0');

View File

@@ -1,6 +1,6 @@
//! Implementation of the LSP for rust-analyzer.
//!
//! This crate takes Rust-specific analysis results from ra_ide and translates
//! This crate takes Rust-specific analysis results from ide and translates
//! into LSP types.
//!
//! It also is the root of all state. `world` module defines the bulk of the
@@ -41,7 +41,7 @@ use serde::de::DeserializeOwned;
pub type Result<T, E = Box<dyn std::error::Error + Send + Sync>> = std::result::Result<T, E>;
pub use crate::{caps::server_capabilities, main_loop::main_loop};
use ra_ide::AnalysisHost;
use ide::AnalysisHost;
use std::fmt;
use vfs::Vfs;

View File

@@ -2,8 +2,8 @@
use std::{error::Error, ops::Range};
use base_db::Canceled;
use ide::LineIndex;
use lsp_server::Notification;
use ra_ide::LineIndex;
use crate::{from_proto, global_state::GlobalState};

View File

@@ -7,9 +7,9 @@ use std::{
use base_db::VfsPath;
use crossbeam_channel::{select, Receiver};
use ide::{Canceled, FileId};
use lsp_server::{Connection, Notification, Request, Response};
use lsp_types::notification::Notification as _;
use ra_ide::{Canceled, FileId};
use crate::{
config::Config,

View File

@@ -3,8 +3,8 @@ use std::{mem, sync::Arc};
use base_db::{CrateGraph, SourceRoot, VfsPath};
use flycheck::FlycheckHandle;
use ide::AnalysisChange;
use project_model::{ProcMacroClient, ProjectWorkspace};
use ra_ide::AnalysisChange;
use vfs::{file_set::FileSetConfig, AbsPath, AbsPathBuf, ChangeKind};
use crate::{

View File

@@ -5,13 +5,13 @@ use std::{
};
use base_db::{FileId, FileRange};
use itertools::Itertools;
use ra_ide::{
use ide::{
Assist, AssistKind, CallInfo, CompletionItem, CompletionItemKind, Documentation,
FileSystemEdit, Fold, FoldKind, Highlight, HighlightModifier, HighlightTag, HighlightedRange,
Indel, InlayHint, InlayKind, InsertTextFormat, LineIndex, Markup, NavigationTarget,
ReferenceAccess, ResolvedAssist, Runnable, Severity, SourceChange, SourceFileEdit, TextEdit,
};
use itertools::Itertools;
use syntax::{SyntaxKind, TextRange, TextSize};
use crate::{
@@ -761,7 +761,7 @@ pub(crate) fn markup_content(markup: Markup) -> lsp_types::MarkupContent {
#[cfg(test)]
mod tests {
use ra_ide::Analysis;
use ide::Analysis;
use super::*;