Skip to main content

Module lang

Module lang 

Source
Expand description

Language detection by file extension.

Maps file extensions to supported language identifiers.

All languages are unconditionally compiled in. The historical lang-* Cargo feature gates have been removed; every registered extension is always available at runtime. This simplifies the build matrix and guarantees that callers never get a feature-gate error for a language that “should” be supported.

Functions§

language_for_extension
Returns the language identifier for the given file extension, or None if unsupported.
supported_extensions
Returns all file extensions supported by the compiled feature set.
supported_languages
Returns a static slice of all supported language names.