aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api_light/src/lib.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-03-20 20:53:45 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-03-20 20:53:45 +0000
commit8b61ea127c596e4305acffa0d9180e48bd57f6c4 (patch)
tree748877a47b9a94d65d40037fbcf0d6be375569ce /crates/ra_ide_api_light/src/lib.rs
parent90ff3ba64133c1bcae9d49709c4dd704ae59b1ee (diff)
parentb931a472c4465e553f23c8b0e0e754b7b06169dd (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.rs34
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
6mod extend_selection;
7mod folding_ranges; 6mod folding_ranges;
8mod line_index; 7mod line_index;
9mod line_index_utils; 8mod line_index_utils;
@@ -14,15 +13,16 @@ mod join_lines;
14mod typing; 13mod typing;
15mod diagnostics; 14mod diagnostics;
16 15
17#[derive(Debug)] 16use rustc_hash::FxHashSet;
18pub struct LocalEdit { 17use ra_text_edit::TextEditBuilder;
19 pub label: String, 18use 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
24pub use self::{ 25pub 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};
35use ra_text_edit::TextEditBuilder; 34
36use ra_syntax::{ 35#[derive(Debug)]
37 SourceFile, SyntaxNode, TextRange, TextUnit, Direction, 36pub 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}
42use rustc_hash::FxHashSet;
43 41
44#[derive(Debug)] 42#[derive(Debug)]
45pub struct HighlightedRange { 43pub struct HighlightedRange {