Skip to main content

detect

Function detect 

Source
pub fn detect(path: &str) -> Option<Lang>
Expand description

Detect a supported language from a path — extension first, then the well-known extension-less basenames have no grammar here (they are text-sniffed upstream); a None simply means “no outline”, never an error: the lens degrades to the plain text loop (doc 20 §9).