summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock2
-rw-r--r--helix-core/src/lib.rs8
-rw-r--r--helix-term/Cargo.toml3
-rw-r--r--helix-term/src/ui/prompt.rs6
4 files changed, 10 insertions, 9 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 960d55f1..896f7bc1 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -329,8 +329,6 @@ dependencies = [
"serde_json",
"tokio",
"toml",
- "unicode-segmentation",
- "unicode-width",
]
[[package]]
diff --git a/helix-core/src/lib.rs b/helix-core/src/lib.rs
index d669fa49..4a9ac891 100644
--- a/helix-core/src/lib.rs
+++ b/helix-core/src/lib.rs
@@ -18,6 +18,12 @@ mod state;
pub mod syntax;
mod transaction;
+pub mod unicode {
+ pub use unicode_general_category as category;
+ pub use unicode_segmentation as segmentation;
+ pub use unicode_width as width;
+}
+
static RUNTIME_DIR: once_cell::sync::Lazy<std::path::PathBuf> =
once_cell::sync::Lazy::new(runtime_dir);
@@ -97,8 +103,6 @@ pub use ropey::{Rope, RopeSlice};
pub use tendril::StrTendril as Tendril;
-pub use unicode_general_category::get_general_category;
-
#[doc(inline)]
pub use {regex, tree_sitter};
diff --git a/helix-term/Cargo.toml b/helix-term/Cargo.toml
index 24741796..385af64c 100644
--- a/helix-term/Cargo.toml
+++ b/helix-term/Cargo.toml
@@ -54,6 +54,3 @@ toml = "0.5"
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
-
-unicode-segmentation = "1.7"
-unicode-width = "0.1"
diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs
index d1413209..22158e78 100644
--- a/helix-term/src/ui/prompt.rs
+++ b/helix-term/src/ui/prompt.rs
@@ -6,8 +6,10 @@ use helix_view::{Editor, Theme};
use std::{borrow::Cow, ops::RangeFrom};
use tui::terminal::CursorKind;
-use unicode_segmentation::{GraphemeCursor, GraphemeIncomplete};
-use unicode_width::UnicodeWidthStr;
+use helix_core::{
+ unicode::segmentation::{GraphemeCursor, GraphemeIncomplete},
+ unicode::width::UnicodeWidthStr,
+};
pub type Completion = (RangeFrom<usize>, Cow<'static, str>);