pub fn language_for_path(path: &str) -> &strExpand description
Returns the language identifier for syntax highlighting based on a file path.
Filenames whose extension alone points to the wrong language
(e.g. CMakeLists.txt) are looked up by name first. Otherwise the file
extension is used when present; extensionless filenames
(e.g. Dockerfile, Makefile) are looked up by name.