Skip to main content

detect_language

Function detect_language 

Source
pub fn detect_language(path: &Path) -> Language
Expand description

Detect programming language from file extension.

Only languages with a tree-sitter grammar in this project are explicitly matched. Config files, markdown, shell scripts, etc. return Language::Unknown — they are still walked and stored but not parsed.