Skip to main content

language_for_path

Function language_for_path 

Source
pub fn language_for_path(path: &str) -> &str
Expand description

Returns the language identifier for syntax highlighting based on a file path.

Uses the file extension when present; extensionless filenames (e.g. Dockerfile, Makefile) are looked up by name.