Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-view/src/lib.rs')
| -rw-r--r-- | helix-view/src/lib.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/helix-view/src/lib.rs b/helix-view/src/lib.rs index b8519650..5ba31853 100644 --- a/helix-view/src/lib.rs +++ b/helix-view/src/lib.rs @@ -1,17 +1,22 @@ #[macro_use] pub mod macros; +pub mod args; pub mod backend { #[cfg(feature = "term")] pub mod term; } pub mod clipboard; +pub mod commands; pub mod compositor; pub mod document; pub mod editor; +pub mod ui; pub use helix_graphics as graphics; pub mod gutter; pub mod job; +pub mod keymap; +pub use keymap::macros::*; pub mod handlers { #[cfg(feature = "dap")] pub mod dap; @@ -47,6 +52,17 @@ slotmap::new_key_type! { pub struct ViewId; } +#[cfg(not(windows))] +pub fn true_color() -> bool { + std::env::var("COLORTERM") + .map(|v| matches!(v.as_str(), "truecolor" | "24bit")) + .unwrap_or(false) +} +#[cfg(windows)] +pub fn true_color() -> bool { + true +} + pub enum Align { Top, Center, |