Re-export unicode crates from helix_core

This commit is contained in:
Blaž Hrastnik 2021-06-18 17:47:10 +09:00
parent 9275021497
commit e9a3245aae
4 changed files with 10 additions and 9 deletions

2
Cargo.lock generated
View file

@ -329,8 +329,6 @@ dependencies = [
"serde_json",
"tokio",
"toml",
"unicode-segmentation",
"unicode-width",
]
[[package]]

View file

@ -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};

View file

@ -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"

View file

@ -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>);