Damson/src/syntax/mod.rs
astar76 1c1dab0a5d Detect the language of unnamed files from their text
Untitled files had no language, so they showed no colours. They now read
shebangs, modelines and headers, then score how the code reads, as the
text changes. The tab and save dialog take a matching name. Save As now
re-detects, and ties between definitions go to the first one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 17:49:30 -06:00

13 lines
438 B
Rust

//! Runs Kate's own syntax definitions (the KSyntaxHighlighting XML format).
//!
//! `def` reads the XML into compiled contexts and rules, `engine` walks a line through them, and
//! `registry` finds definitions on disk and picks one for a file.
pub mod def;
pub mod engine;
pub mod guess;
pub mod registry;
pub use def::{DefStyle, StyleId};
pub use engine::{FoldEvent, LineResult, Span, State};
pub use registry::{Language, Registry};