diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-03-20 20:53:45 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-03-20 20:53:45 +0000 |
commit | 8b61ea127c596e4305acffa0d9180e48bd57f6c4 (patch) | |
tree | 748877a47b9a94d65d40037fbcf0d6be375569ce /crates/ra_ide_api_light/src/lib.rs | |
parent | 90ff3ba64133c1bcae9d49709c4dd704ae59b1ee (diff) | |
parent | b931a472c4465e553f23c8b0e0e754b7b06169dd (diff) |
Merge #1008
1008: Move extend selection to ra_ide_api r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api_light/src/lib.rs')
-rw-r--r-- | crates/ra_ide_api_light/src/lib.rs | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/crates/ra_ide_api_light/src/lib.rs b/crates/ra_ide_api_light/src/lib.rs index 43cdd6ea4..ca13eb018 100644 --- a/crates/ra_ide_api_light/src/lib.rs +++ b/crates/ra_ide_api_light/src/lib.rs | |||
@@ -3,7 +3,6 @@ | |||
3 | //! This usually means functions which take syntax tree as an input and produce | 3 | //! This usually means functions which take syntax tree as an input and produce |
4 | //! an edit or some auxiliary info. | 4 | //! an edit or some auxiliary info. |
5 | 5 | ||
6 | mod extend_selection; | ||
7 | mod folding_ranges; | 6 | mod folding_ranges; |
8 | mod line_index; | 7 | mod line_index; |
9 | mod line_index_utils; | 8 | mod line_index_utils; |
@@ -14,15 +13,16 @@ mod join_lines; | |||
14 | mod typing; | 13 | mod typing; |
15 | mod diagnostics; | 14 | mod diagnostics; |
16 | 15 | ||
17 | #[derive(Debug)] | 16 | use rustc_hash::FxHashSet; |
18 | pub struct LocalEdit { | 17 | use ra_text_edit::TextEditBuilder; |
19 | pub label: String, | 18 | use ra_syntax::{ |
20 | pub edit: ra_text_edit::TextEdit, | 19 | SourceFile, SyntaxNode, TextRange, TextUnit, Direction, |
21 | pub cursor_position: Option<TextUnit>, | 20 | algo::find_leaf_at_offset, |
22 | } | 21 | SyntaxKind::{self, *}, |
22 | ast::{self, AstNode}, | ||
23 | }; | ||
23 | 24 | ||
24 | pub use self::{ | 25 | pub use crate::{ |
25 | extend_selection::extend_selection, | ||
26 | folding_ranges::{folding_ranges, Fold, FoldKind}, | 26 | folding_ranges::{folding_ranges, Fold, FoldKind}, |
27 | line_index::{LineCol, LineIndex}, | 27 | line_index::{LineCol, LineIndex}, |
28 | line_index_utils::translate_offset_with_edit, | 28 | line_index_utils::translate_offset_with_edit, |
@@ -30,16 +30,14 @@ pub use self::{ | |||
30 | diagnostics::diagnostics, | 30 | diagnostics::diagnostics, |
31 | join_lines::join_lines, | 31 | join_lines::join_lines, |
32 | typing::{on_enter, on_dot_typed, on_eq_typed}, | 32 | typing::{on_enter, on_dot_typed, on_eq_typed}, |
33 | |||
34 | }; | 33 | }; |
35 | use ra_text_edit::TextEditBuilder; | 34 | |
36 | use ra_syntax::{ | 35 | #[derive(Debug)] |
37 | SourceFile, SyntaxNode, TextRange, TextUnit, Direction, | 36 | pub struct LocalEdit { |
38 | SyntaxKind::{self, *}, | 37 | pub label: String, |
39 | ast::{self, AstNode}, | 38 | pub edit: ra_text_edit::TextEdit, |
40 | algo::find_leaf_at_offset, | 39 | pub cursor_position: Option<TextUnit>, |
41 | }; | 40 | } |
42 | use rustc_hash::FxHashSet; | ||
43 | 41 | ||
44 | #[derive(Debug)] | 42 | #[derive(Debug)] |
45 | pub struct HighlightedRange { | 43 | pub struct HighlightedRange { |