Re-export unicode crates from helix_core

pull/328/head
Blaž Hrastnik 3 years ago
parent 9275021497
commit e9a3245aae

2
Cargo.lock generated

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

@ -18,6 +18,12 @@ mod state;
pub mod syntax; pub mod syntax;
mod transaction; 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> = static RUNTIME_DIR: once_cell::sync::Lazy<std::path::PathBuf> =
once_cell::sync::Lazy::new(runtime_dir); once_cell::sync::Lazy::new(runtime_dir);
@ -97,8 +103,6 @@ pub use ropey::{Rope, RopeSlice};
pub use tendril::StrTendril as Tendril; pub use tendril::StrTendril as Tendril;
pub use unicode_general_category::get_general_category;
#[doc(inline)] #[doc(inline)]
pub use {regex, tree_sitter}; pub use {regex, tree_sitter};

@ -54,6 +54,3 @@ toml = "0.5"
serde_json = "1.0" serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
unicode-segmentation = "1.7"
unicode-width = "0.1"

@ -6,8 +6,10 @@ use helix_view::{Editor, Theme};
use std::{borrow::Cow, ops::RangeFrom}; use std::{borrow::Cow, ops::RangeFrom};
use tui::terminal::CursorKind; use tui::terminal::CursorKind;
use unicode_segmentation::{GraphemeCursor, GraphemeIncomplete}; use helix_core::{
use unicode_width::UnicodeWidthStr; unicode::segmentation::{GraphemeCursor, GraphemeIncomplete},
unicode::width::UnicodeWidthStr,
};
pub type Completion = (RangeFrom<usize>, Cow<'static, str>); pub type Completion = (RangeFrom<usize>, Cow<'static, str>);

Loading…
Cancel
Save