Expand description
Language identification for files.
Provides LanguageId — a lightweight newtype over Cow<'static, str> —
and detect_language, which maps a file path to a language using first
the file extension then a mime-type fallback via mime_guess.
Built-in IDs match the LSP languageId convention (lowercase, e.g. “rust”,
“cpp”). Using Cow keeps zero-allocation for the built-in static strings
while allowing owned Strings for future config-driven mappings.
Structs§
- Language
Id - A language identifier string (e.g.
"rust","cpp","python").
Functions§
- detect_
language - Detect the language of a file from its path.