Support root detection for tsx files.
Close
@@ -44,7 +44,9 @@ pub fn get_rootPath<'a>(
match languageId {
"rust" => traverse_up(path, |dir| dir.join("Cargo.toml").exists()),
"php" => traverse_up(path, |dir| dir.join("composer.json").exists()),
- "javascript" | "typescript" => traverse_up(path, |dir| dir.join("package.json").exists()),
+ "javascript" | "typescript" | "javascript.jsx" | "typescript.jsx" => {
+ traverse_up(path, |dir| dir.join("package.json").exists())
+ }
"python" => traverse_up(path, |dir| {
dir.join("setup.py").exists()
|| dir.join("Pipfile").exists()
