on master help sign in
Re-export unicode crates from helix_core
e9a3245Blaž Hrastnik
Cargo.lock−2
@@ -329,8 +329,6 @@ dependencies = [
329 "serde_json",
329 "serde_json",
330 "tokio",
330 "tokio",
331 "toml",
331 "toml",
332− "unicode-segmentation",
333− "unicode-width",
334]
332]
335
333
336[[package]]
334[[package]]
helix-core/src/lib.rs+6−2
@@ -18,6 +18,12 @@ mod state;
18pub mod syntax;
18pub mod syntax;
19mod transaction;
19mod transaction;
20
20
21+pub mod unicode {
22+ pub use unicode_general_category as category;
23+ pub use unicode_segmentation as segmentation;
24+ pub use unicode_width as width;
25+}
26+
21static RUNTIME_DIR: once_cell::sync::Lazy<std::path::PathBuf> =
27static RUNTIME_DIR: once_cell::sync::Lazy<std::path::PathBuf> =
22 once_cell::sync::Lazy::new(runtime_dir);
28 once_cell::sync::Lazy::new(runtime_dir);
23
29
@@ -97,8 +103,6 @@ pub use ropey::{Rope, RopeSlice};
97
103
98pub use tendril::StrTendril as Tendril;
104pub use tendril::StrTendril as Tendril;
99
105
100−pub use unicode_general_category::get_general_category;
101−
102#[doc(inline)]
106#[doc(inline)]
103pub use {regex, tree_sitter};
107pub use {regex, tree_sitter};
104
108
helix-term/Cargo.toml−3
@@ -54,6 +54,3 @@ toml = "0.5"
54
54
55serde_json = "1.0"
55serde_json = "1.0"
56serde = { version = "1.0", features = ["derive"] }
56serde = { version = "1.0", features = ["derive"] }
57−
58−unicode-segmentation = "1.7"
59−unicode-width = "0.1"
helix-term/src/ui/prompt.rs+4−2
@@ -6,8 +6,10 @@ use helix_view::{Editor, Theme};
6use std::{borrow::Cow, ops::RangeFrom};
6use std::{borrow::Cow, ops::RangeFrom};
7use tui::terminal::CursorKind;
7use tui::terminal::CursorKind;
8
8
9+use helix_core::{
9−use unicode_segmentation::{GraphemeCursor, GraphemeIncomplete};
10+ unicode::segmentation::{GraphemeCursor, GraphemeIncomplete},
10−use unicode_width::UnicodeWidthStr;
11+ unicode::width::UnicodeWidthStr,
12+};
11
13
12pub type Completion = (RangeFrom<usize>, Cow<'static, str>);
14pub type Completion = (RangeFrom<usize>, Cow<'static, str>);
13
15