summaryrefslogtreecommitdiff
path: root/helix-core/src
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-03-22 03:40:07 +0000
committerBlaž Hrastnik2021-03-22 03:40:07 +0000
commitcbcacb1063c9b6384867a6078a75595ae2ff6861 (patch)
tree0b1b48b06eacd14a1ac0eb06581d79b92a01e573 /helix-core/src
parentc4792efead160859d17f8ca969869037b7d2e1d5 (diff)
Merge some imports.
Diffstat (limited to 'helix-core/src')
-rw-r--r--helix-core/src/lib.rs3
-rw-r--r--helix-core/src/syntax.rs25
-rw-r--r--helix-core/src/transaction.rs3
3 files changed, 16 insertions, 15 deletions
diff --git a/helix-core/src/lib.rs b/helix-core/src/lib.rs
index 6b991881..a8a449ca 100644
--- a/helix-core/src/lib.rs
+++ b/helix-core/src/lib.rs
@@ -51,8 +51,7 @@ pub use tendril::StrTendril as Tendril;
pub use {regex, tree_sitter};
pub use position::{coords_at_pos, pos_at_coords, Position};
-pub use selection::Range;
-pub use selection::Selection;
+pub use selection::{Range, Selection};
pub use syntax::Syntax;
pub use diagnostic::Diagnostic;
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs
index e75dc724..c352f8f2 100644
--- a/helix-core/src/syntax.rs
+++ b/helix-core/src/syntax.rs
@@ -1,12 +1,13 @@
use crate::{Change, Rope, RopeSlice, Transaction};
-pub use helix_syntax::Lang;
-pub use helix_syntax::{get_language, get_language_name};
-
-use std::borrow::Cow;
-use std::cell::RefCell;
-use std::collections::HashMap;
-use std::path::{Path, PathBuf};
-use std::sync::Arc;
+pub use helix_syntax::{get_language, get_language_name, Lang};
+
+use std::{
+ borrow::Cow,
+ cell::RefCell,
+ collections::HashMap,
+ path::{Path, PathBuf},
+ sync::Arc,
+};
use once_cell::sync::{Lazy, OnceCell};
@@ -355,9 +356,11 @@ pub struct LanguageLayer {
pub(crate) tree: Option<Tree>,
}
-use crate::coords_at_pos;
-use crate::transaction::{ChangeSet, Operation};
-use crate::Tendril;
+use crate::{
+ coords_at_pos,
+ transaction::{ChangeSet, Operation},
+ Tendril,
+};
impl LanguageLayer {
// pub fn new() -> Self {
diff --git a/helix-core/src/transaction.rs b/helix-core/src/transaction.rs
index f25ee208..d707016b 100644
--- a/helix-core/src/transaction.rs
+++ b/helix-core/src/transaction.rs
@@ -1,6 +1,5 @@
use crate::{Range, Rope, Selection, State, Tendril};
-use std::borrow::Cow;
-use std::convert::TryFrom;
+use std::{borrow::Cow, convert::TryFrom};
/// (from, to, replacement)
pub type Change = (usize, usize, Option<Tendril>);