Skip to main content

language_for_extension

Function language_for_extension 

Source
pub fn language_for_extension(ext: &str) -> Option<&'static str>
Expand description

Returns the language identifier for the given file extension, or None if unsupported.

The lookup is case-insensitive. Supported extensions include rs, py, go, java, ts, tsx, f90, f95, for, ftn, and other Fortran variants.