BlueGit

ict rusty-teams

Files

rusty-teams / vendor / gpui-component / src / highlighter / mod.rs

mod.rs

mod.rs 1.2 KiB Download Raw
1mod language_name;
2pub use gpui_base::input::{
3 Diagnostic, DiagnosticEntry, DiagnosticRelatedInformation, DiagnosticSet, DiagnosticSeverity,
4 DiagnosticSummary, DiagnosticTag, RelatedInformation,
5};
6pub(crate) use language_name::language_name;
7
8mod diagnostic_styles;
9pub(crate) use diagnostic_styles::*;
10
11#[cfg(feature = "tree-sitter")]
12mod input_adapter;
13#[cfg(feature = "tree-sitter")]
14pub(crate) use input_adapter::input_highlighter_factory;
15
16#[cfg(not(feature = "tree-sitter"))]
17pub(crate) fn input_highlighter_factory() -> gpui_base::input::InputHighlighterFactory {
18 std::rc::Rc::new(|_| None)
19}
20
21// Native implementation with full tree-sitter support
22#[cfg(feature = "tree-sitter")]
23mod highlighter;
24#[cfg(feature = "tree-sitter")]
25mod languages;
26#[cfg(feature = "tree-sitter")]
27mod registry;
28
29#[cfg(feature = "tree-sitter")]
30pub(crate) use highlighter::parse_input_bytes;
31#[cfg(feature = "tree-sitter")]
32pub use highlighter::*;
33#[cfg(feature = "tree-sitter")]
34pub use languages::*;
35#[cfg(feature = "tree-sitter")]
36pub use registry::*;
37
38// WASM stub implementation (no tree-sitter support or disabled)
39#[cfg(not(feature = "tree-sitter"))]
40mod wasm_stub;
41#[cfg(not(feature = "tree-sitter"))]
42pub use wasm_stub::*;