Expand description
Code-document configuration, models, syntax, search, and semantic adapters. Code-document metadata plus syntax, search, folding, diagnostics, and symbols.
§Examples
use ailloli_ui_editor::{code::detect_language, EditorLanguage};
assert_eq!(detect_language(Some(std::path::Path::new("main.rs"))), EditorLanguage::Rust);Re-exports§
pub use config::CodeEditorConfig;pub use config::CodeEditorFeatureFlags;pub use config::CodeTheme;pub use config::GutterConfig;pub use diagnostics::diagnostic_at_byte;pub use diagnostics::Diagnostic;pub use diagnostics::DiagnosticHit;pub use diagnostics::DiagnosticSeverity;pub use diagnostics::DiagnosticSource;pub use folding::collapsed_region_hiding_line;pub use folding::fold_region_at_line;pub use folding::fold_regions_for_document;pub use folding::line_for_byte;pub use folding::line_start_byte;pub use folding::merge_fold_regions_with_previous;pub use folding::FoldRegion;pub use folding::FoldRegionId;pub use search::find_matches;pub use search::SearchMatch;pub use search::SearchQuery;pub use search::SearchState;pub use semantic::collect_lsp_enrichment;pub use semantic::import_scip_json_str;pub use semantic::lsp_diagnostics_to_diagnostics;pub use semantic::lsp_symbols_to_code_symbols;pub use semantic::merge_code_file_summaries;pub use semantic::scip_document_to_summary;pub use semantic::scip_project_to_summary;pub use semantic::scip_symbols_to_code_symbols;pub use semantic::semantic_references_to_edges;pub use semantic::LspBackend;pub use semantic::LspCapabilities;pub use semantic::LspDiagnostic;pub use semantic::LspEnrichment;pub use semantic::LspError;pub use semantic::LspRequestId;pub use semantic::NoopLspBackend;pub use semantic::ScipDocumentIndex;pub use semantic::ScipImportError;pub use semantic::ScipOccurrence;pub use semantic::ScipOccurrenceRole;pub use semantic::ScipProjectIndex;pub use semantic::ScipProjectMetadata;pub use semantic::ScipProjectSummary;pub use semantic::ScipRelation;pub use semantic::ScipSymbol;pub use semantic::SemanticDocumentSymbol;pub use semantic::SemanticReference;pub use session::CodeEditorSession;pub use symbols::TreeSitterRustSymbolIndexer;pub use symbols::index_symbols_with_fallback;pub use symbols::CodeFileSummary;pub use symbols::CodeSymbol;pub use symbols::LexicalRustSymbolIndexer;pub use symbols::SymbolEdge;pub use symbols::SymbolEdgeKind;pub use symbols::SymbolId;pub use symbols::SymbolIndexer;pub use symbols::SymbolKind;pub use symbols::SymbolSource;pub use syntax::highlight_rust_tree_sitter_hybrid;pub use syntax::highlight_rust_lexical;pub use syntax::SyntaxKind;pub use syntax::SyntaxToken;
Modules§
- config
- Code-editor and gutter configuration. Code-editor feature, gutter, scrollbar, and semantic color configuration.
- diagnostics
- Source diagnostics and byte hit testing. Version-aware diagnostic value types and byte hit testing.
- folding
- Logical-line fold regions and discovery. Logical-line fold regions, discovery, and collapsed-state transfer.
- search
- Cached byte-range text search. Cached, non-overlapping UTF-8 byte-range text search.
- semantic
- Optional LSP and SCIP semantic enrichment models. UI-agnostic LSP enrichment and JSON SCIP import models.
- session
- Document-aware editor session state. Document-aware editor session orchestration.
- symbols
- Local symbol indexing and graph summaries. Local lexical, Tree-sitter, and optional universal-ctags symbol indexing.
- syntax
- Rust lexical and optional Tree-sitter syntax tokens. Deterministic Rust syntax tokenization and optional Tree-sitter enrichment.
Structs§
- Document
- Open document metadata plus rope-backed text.
- Document
Id - Stable identifier for an open document in an editor session.
- Document
Version - Monotonic revision of a document’s buffer content.
Enums§
- Document
Source - Origin used for path hints and persistence routing.
- Editor
Language - Syntax/language selection used by highlighting, folding, and indexing.
Functions§
- detect_
language - Detects language solely from a case-insensitive filename extension.
- resolve_
document_ language - Resolves an override, explicit language, or extension-derived fallback.