| 1 | mod language_name; |
| 2 | pub use gpui_base::input::{ |
| 3 | Diagnostic, DiagnosticEntry, DiagnosticRelatedInformation, DiagnosticSet, DiagnosticSeverity, |
| 4 | DiagnosticSummary, DiagnosticTag, RelatedInformation, |
| 5 | }; |
| 6 | pub(crate) use language_name::language_name; |
| 7 | |
| 8 | mod diagnostic_styles; |
| 9 | pub(crate) use diagnostic_styles::*; |
| 10 | |
| 11 | #[cfg(feature = "tree-sitter")] |
| 12 | mod input_adapter; |
| 13 | #[cfg(feature = "tree-sitter")] |
| 14 | pub(crate) use input_adapter::input_highlighter_factory; |
| 15 | |
| 16 | #[cfg(not(feature = "tree-sitter"))] |
| 17 | pub(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")] |
| 23 | mod highlighter; |
| 24 | #[cfg(feature = "tree-sitter")] |
| 25 | mod languages; |
| 26 | #[cfg(feature = "tree-sitter")] |
| 27 | mod registry; |
| 28 | |
| 29 | #[cfg(feature = "tree-sitter")] |
| 30 | pub(crate) use highlighter::parse_input_bytes; |
| 31 | #[cfg(feature = "tree-sitter")] |
| 32 | pub use highlighter::*; |
| 33 | #[cfg(feature = "tree-sitter")] |
| 34 | pub use languages::*; |
| 35 | #[cfg(feature = "tree-sitter")] |
| 36 | pub use registry::*; |
| 37 | |
| 38 | // WASM stub implementation (no tree-sitter support or disabled) |
| 39 | #[cfg(not(feature = "tree-sitter"))] |
| 40 | mod wasm_stub; |
| 41 | #[cfg(not(feature = "tree-sitter"))] |
| 42 | pub use wasm_stub::*; |