use tree_sitter::Language;
pub fn chunk_language(ext: &str) -> Option<Language> {
Some(match ext {
"rs" => tree_sitter_rust::LANGUAGE.into(),
"ts" => tree_sitter_typescript::LANGUAGE_TYPESCRIPT.into(),
"tsx" => tree_sitter_typescript::LANGUAGE_TSX.into(),
"js" | "jsx" => tree_sitter_javascript::LANGUAGE.into(),
"py" => tree_sitter_python::LANGUAGE.into(),
"go" => tree_sitter_go::LANGUAGE.into(),
"java" => tree_sitter_java::LANGUAGE.into(),
"c" | "h" => tree_sitter_c::LANGUAGE.into(),
"cpp" | "cc" | "cxx" | "hpp" | "hxx" | "hh" => tree_sitter_cpp::LANGUAGE.into(),
_ => return None,
})
}