mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-12 05:08:52 +00:00
Rename ra_text_edit -> text_edit
This commit is contained in:
parent
7510048ec0
commit
6dafc13f5f
29 changed files with 42 additions and 42 deletions
26
Cargo.lock
generated
26
Cargo.lock
generated
|
@ -927,10 +927,10 @@ dependencies = [
|
|||
"ra_hir",
|
||||
"ra_ide_db",
|
||||
"ra_syntax",
|
||||
"ra_text_edit",
|
||||
"rustc-hash",
|
||||
"stdx",
|
||||
"test_utils",
|
||||
"text_edit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1075,10 +1075,10 @@ dependencies = [
|
|||
"ra_ide_db",
|
||||
"ra_ssr",
|
||||
"ra_syntax",
|
||||
"ra_text_edit",
|
||||
"rustc-hash",
|
||||
"stdx",
|
||||
"test_utils",
|
||||
"text_edit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1093,11 +1093,11 @@ dependencies = [
|
|||
"ra_db",
|
||||
"ra_hir",
|
||||
"ra_syntax",
|
||||
"ra_text_edit",
|
||||
"rayon",
|
||||
"rustc-hash",
|
||||
"stdx",
|
||||
"test_utils",
|
||||
"text_edit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1177,9 +1177,9 @@ dependencies = [
|
|||
"ra_hir",
|
||||
"ra_ide_db",
|
||||
"ra_syntax",
|
||||
"ra_text_edit",
|
||||
"rustc-hash",
|
||||
"test_utils",
|
||||
"text_edit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1191,7 +1191,6 @@ dependencies = [
|
|||
"itertools",
|
||||
"once_cell",
|
||||
"ra_parser",
|
||||
"ra_text_edit",
|
||||
"rayon",
|
||||
"rowan",
|
||||
"rustc-ap-rustc_lexer",
|
||||
|
@ -1200,16 +1199,10 @@ dependencies = [
|
|||
"smol_str",
|
||||
"stdx",
|
||||
"test_utils",
|
||||
"text_edit",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ra_text_edit"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"text-size",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rayon"
|
||||
version = "1.3.1"
|
||||
|
@ -1312,13 +1305,13 @@ dependencies = [
|
|||
"ra_project_model",
|
||||
"ra_ssr",
|
||||
"ra_syntax",
|
||||
"ra_text_edit",
|
||||
"rayon",
|
||||
"rustc-hash",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"stdx",
|
||||
"test_utils",
|
||||
"text_edit",
|
||||
"threadpool",
|
||||
"toolchain",
|
||||
"tt",
|
||||
|
@ -1565,6 +1558,13 @@ version = "1.0.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f03e7efdedc3bc78cb2337f1e2785c39e45f5ef762d9e4ebb137fff7380a6d8a"
|
||||
|
||||
[[package]]
|
||||
name = "text_edit"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"text-size",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thin-dst"
|
||||
version = "1.1.0"
|
||||
|
|
|
@ -16,7 +16,7 @@ either = "1.5.3"
|
|||
stdx = { path = "../stdx" }
|
||||
|
||||
ra_syntax = { path = "../ra_syntax" }
|
||||
ra_text_edit = { path = "../ra_text_edit" }
|
||||
text_edit = { path = "../text_edit" }
|
||||
ra_fmt = { path = "../ra_fmt" }
|
||||
profile = { path = "../profile" }
|
||||
ra_db = { path = "../ra_db" }
|
||||
|
|
|
@ -15,7 +15,7 @@ use ra_syntax::{
|
|||
AstNode, SourceFile, SyntaxElement, SyntaxKind, SyntaxNode, SyntaxToken, TextRange, TextSize,
|
||||
TokenAtOffset,
|
||||
};
|
||||
use ra_text_edit::{TextEdit, TextEditBuilder};
|
||||
use text_edit::{TextEdit, TextEditBuilder};
|
||||
|
||||
use crate::{
|
||||
assist_config::{AssistConfig, SnippetCap},
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// FIXME: rewrite according to the plan, outlined in
|
||||
// https://github.com/rust-analyzer/rust-analyzer/issues/3301#issuecomment-592931553
|
||||
|
||||
use either::Either;
|
||||
use hir::{self, ModPath};
|
||||
use ra_syntax::{
|
||||
ast::{self, NameOwner, VisibilityOwner},
|
||||
|
@ -9,10 +10,9 @@ use ra_syntax::{
|
|||
SyntaxKind::{PATH, PATH_SEGMENT},
|
||||
SyntaxNode, T,
|
||||
};
|
||||
use ra_text_edit::TextEditBuilder;
|
||||
use text_edit::TextEditBuilder;
|
||||
|
||||
use crate::assist_context::AssistContext;
|
||||
use either::Either;
|
||||
|
||||
/// Determines the containing syntax node in which to insert a `use` statement affecting `position`.
|
||||
pub(crate) fn find_insert_use_container(
|
||||
|
|
|
@ -22,7 +22,7 @@ oorandom = "11.1.2"
|
|||
stdx = { path = "../stdx" }
|
||||
|
||||
ra_syntax = { path = "../ra_syntax" }
|
||||
ra_text_edit = { path = "../ra_text_edit" }
|
||||
text_edit = { path = "../text_edit" }
|
||||
ra_db = { path = "../ra_db" }
|
||||
ra_ide_db = { path = "../ra_ide_db" }
|
||||
ra_cfg = { path = "../ra_cfg" }
|
||||
|
|
|
@ -4,7 +4,7 @@ use ra_syntax::{
|
|||
ast::{self, AstNode},
|
||||
TextRange, TextSize,
|
||||
};
|
||||
use ra_text_edit::TextEdit;
|
||||
use text_edit::TextEdit;
|
||||
|
||||
use crate::{
|
||||
completion::{
|
||||
|
|
|
@ -37,7 +37,7 @@ use ra_syntax::{
|
|||
ast::{self, edit, Impl},
|
||||
AstNode, SyntaxKind, SyntaxNode, TextRange, T,
|
||||
};
|
||||
use ra_text_edit::TextEdit;
|
||||
use text_edit::TextEdit;
|
||||
|
||||
use crate::{
|
||||
completion::{
|
||||
|
|
|
@ -9,7 +9,7 @@ use ra_syntax::{
|
|||
SyntaxKind::*,
|
||||
SyntaxNode, SyntaxToken, TextRange, TextSize,
|
||||
};
|
||||
use ra_text_edit::Indel;
|
||||
use text_edit::Indel;
|
||||
|
||||
use super::patterns::{
|
||||
has_bind_pat_parent, has_block_expr_parent, has_impl_as_prev_sibling, has_impl_parent,
|
||||
|
|
|
@ -4,7 +4,7 @@ use std::fmt;
|
|||
|
||||
use hir::Documentation;
|
||||
use ra_syntax::TextRange;
|
||||
use ra_text_edit::TextEdit;
|
||||
use text_edit::TextEdit;
|
||||
|
||||
use crate::completion::completion_config::SnippetCap;
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ use ra_syntax::{
|
|||
ast::{self, AstNode},
|
||||
SyntaxNode, TextRange, T,
|
||||
};
|
||||
use ra_text_edit::TextEdit;
|
||||
use text_edit::TextEdit;
|
||||
|
||||
use crate::{Diagnostic, FileId, Fix, SourceFileEdit};
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ use ra_ide_db::{
|
|||
RootDatabase,
|
||||
};
|
||||
use ra_syntax::{algo, ast, AstNode};
|
||||
use ra_text_edit::TextEdit;
|
||||
use text_edit::TextEdit;
|
||||
|
||||
/// A [Diagnostic] that potentially has a fix available.
|
||||
///
|
||||
|
|
|
@ -7,7 +7,7 @@ use ra_syntax::{
|
|||
SyntaxKind::{self, WHITESPACE},
|
||||
SyntaxNode, SyntaxToken, TextRange, TextSize, T,
|
||||
};
|
||||
use ra_text_edit::{TextEdit, TextEditBuilder};
|
||||
use text_edit::{TextEdit, TextEditBuilder};
|
||||
|
||||
// Feature: Join Lines
|
||||
//
|
||||
|
|
|
@ -96,7 +96,7 @@ pub use ra_ide_db::{
|
|||
RootDatabase,
|
||||
};
|
||||
pub use ra_ssr::SsrError;
|
||||
pub use ra_text_edit::{Indel, TextEdit};
|
||||
pub use text_edit::{Indel, TextEdit};
|
||||
|
||||
pub type Cancelable<T> = Result<T, Canceled>;
|
||||
|
||||
|
|
|
@ -11,9 +11,9 @@ use ra_syntax::{
|
|||
ast::{self, NameOwner},
|
||||
lex_single_valid_syntax_kind, match_ast, AstNode, SyntaxKind, SyntaxNode, SyntaxToken,
|
||||
};
|
||||
use ra_text_edit::TextEdit;
|
||||
use std::convert::TryInto;
|
||||
use test_utils::mark;
|
||||
use text_edit::TextEdit;
|
||||
|
||||
use crate::{
|
||||
references::find_all_refs, FilePosition, FileSystemEdit, RangeInfo, Reference, ReferenceKind,
|
||||
|
@ -271,9 +271,9 @@ fn rename_reference(
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use expect::{expect, Expect};
|
||||
use ra_text_edit::TextEditBuilder;
|
||||
use stdx::trim_indent;
|
||||
use test_utils::{assert_eq_text, mark};
|
||||
use text_edit::TextEdit;
|
||||
|
||||
use crate::{mock_analysis::analysis_and_position, FileId};
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ use ra_syntax::{
|
|||
TextRange, TextSize,
|
||||
};
|
||||
|
||||
use ra_text_edit::TextEdit;
|
||||
use text_edit::TextEdit;
|
||||
|
||||
use crate::SourceChange;
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@ use ra_syntax::{
|
|||
SyntaxKind::*,
|
||||
SyntaxToken, TextRange, TextSize, TokenAtOffset,
|
||||
};
|
||||
use ra_text_edit::TextEdit;
|
||||
use test_utils::mark;
|
||||
use text_edit::TextEdit;
|
||||
|
||||
// Feature: On Enter
|
||||
//
|
||||
|
|
|
@ -22,7 +22,7 @@ either = "1.5.3"
|
|||
stdx = { path = "../stdx" }
|
||||
|
||||
ra_syntax = { path = "../ra_syntax" }
|
||||
ra_text_edit = { path = "../ra_text_edit" }
|
||||
text_edit = { path = "../text_edit" }
|
||||
ra_db = { path = "../ra_db" }
|
||||
profile = { path = "../profile" }
|
||||
test_utils = { path = "../test_utils" }
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
//! It can be viewed as a dual for `AnalysisChange`.
|
||||
|
||||
use ra_db::FileId;
|
||||
use ra_text_edit::TextEdit;
|
||||
use text_edit::TextEdit;
|
||||
|
||||
#[derive(Default, Debug, Clone)]
|
||||
pub struct SourceChange {
|
||||
|
|
|
@ -11,7 +11,7 @@ repository = "https://github.com/rust-analyzer/rust-analyzer"
|
|||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
ra_text_edit = { path = "../ra_text_edit" }
|
||||
text_edit = { path = "../text_edit" }
|
||||
ra_syntax = { path = "../ra_syntax" }
|
||||
ra_db = { path = "../ra_db" }
|
||||
ra_ide_db = { path = "../ra_ide_db" }
|
||||
|
|
|
@ -4,8 +4,8 @@ use crate::matching::Var;
|
|||
use crate::{resolving::ResolvedRule, Match, SsrMatches};
|
||||
use ra_syntax::ast::{self, AstToken};
|
||||
use ra_syntax::{SyntaxElement, SyntaxKind, SyntaxNode, SyntaxToken, TextRange, TextSize};
|
||||
use ra_text_edit::TextEdit;
|
||||
use rustc_hash::{FxHashMap, FxHashSet};
|
||||
use text_edit::TextEdit;
|
||||
|
||||
/// Returns a text edit that will replace each match in `matches` with its corresponding replacement
|
||||
/// template. Placeholders in the template will have been substituted with whatever they matched to
|
||||
|
|
|
@ -20,7 +20,7 @@ once_cell = "1.3.1"
|
|||
|
||||
stdx = { path = "../stdx" }
|
||||
|
||||
ra_text_edit = { path = "../ra_text_edit" }
|
||||
text_edit = { path = "../text_edit" }
|
||||
ra_parser = { path = "../ra_parser" }
|
||||
|
||||
# This crate transitively depends on `smol_str` via `rowan`.
|
||||
|
|
|
@ -11,7 +11,7 @@ cargo-fuzz = true
|
|||
|
||||
[dependencies]
|
||||
ra_syntax = { path = ".." }
|
||||
ra_text_edit = { path = "../../ra_text_edit" }
|
||||
text_edit = { path = "../../text_edit" }
|
||||
libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer-sys.git" }
|
||||
|
||||
# Prevent this from interfering with workspaces
|
||||
|
|
|
@ -6,8 +6,8 @@ use std::{
|
|||
};
|
||||
|
||||
use itertools::Itertools;
|
||||
use ra_text_edit::TextEditBuilder;
|
||||
use rustc_hash::FxHashMap;
|
||||
use text_edit::TextEditBuilder;
|
||||
|
||||
use crate::{
|
||||
AstNode, Direction, NodeOrToken, SyntaxElement, SyntaxKind, SyntaxNode, SyntaxNodePtr,
|
||||
|
|
|
@ -5,7 +5,7 @@ use std::{
|
|||
str::{self, FromStr},
|
||||
};
|
||||
|
||||
use ra_text_edit::Indel;
|
||||
use text_edit::Indel;
|
||||
|
||||
use crate::{validation, AstNode, SourceFile, TextRange};
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@ pub mod fuzz;
|
|||
|
||||
use std::{marker::PhantomData, sync::Arc};
|
||||
|
||||
use ra_text_edit::Indel;
|
||||
use stdx::format_to;
|
||||
use text_edit::Indel;
|
||||
|
||||
pub use crate::{
|
||||
algo::InsertPosition,
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//! and try to parse only this block.
|
||||
|
||||
use ra_parser::Reparser;
|
||||
use ra_text_edit::Indel;
|
||||
use text_edit::Indel;
|
||||
|
||||
use crate::{
|
||||
algo,
|
||||
|
|
|
@ -39,7 +39,7 @@ ra_ide = { path = "../ra_ide" }
|
|||
profile = { path = "../profile" }
|
||||
ra_project_model = { path = "../ra_project_model" }
|
||||
ra_syntax = { path = "../ra_syntax" }
|
||||
ra_text_edit = { path = "../ra_text_edit" }
|
||||
text_edit = { path = "../text_edit" }
|
||||
vfs = { path = "../vfs" }
|
||||
vfs-notify = { path = "../vfs-notify" }
|
||||
ra_cfg = { path = "../ra_cfg" }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "ra_text_edit"
|
||||
name = "text_edit"
|
||||
version = "0.0.0"
|
||||
license = "MIT OR Apache-2.0"
|
||||
authors = ["rust-analyzer developers"]
|
Loading…
Reference in a new issue