diff --git a/src/main/kotlin/com/github/warningimhack3r/intellijshadcnplugin/backend/helpers/FileManager.kt b/src/main/kotlin/com/github/warningimhack3r/intellijshadcnplugin/backend/helpers/FileManager.kt index 7adec6d..1c58f63 100644 --- a/src/main/kotlin/com/github/warningimhack3r/intellijshadcnplugin/backend/helpers/FileManager.kt +++ b/src/main/kotlin/com/github/warningimhack3r/intellijshadcnplugin/backend/helpers/FileManager.kt @@ -83,7 +83,9 @@ class FileManager(private val project: Project) { ) } }).filter { file -> - !file.path.contains("/node_modules/") && !file.path.contains("/.git/") + !file.path.contains("/node_modules/") + && !file.path.contains("/.git/") + && !file.parent.name.startsWith('.') }.sortedBy { file -> name.toRegex().find(file.path)?.range?.first ?: Int.MAX_VALUE }.also { diff --git a/src/main/kotlin/com/github/warningimhack3r/intellijshadcnplugin/ui/ISPPanelPopulator.kt b/src/main/kotlin/com/github/warningimhack3r/intellijshadcnplugin/ui/ISPPanelPopulator.kt index 461bf7e..ca4d55e 100644 --- a/src/main/kotlin/com/github/warningimhack3r/intellijshadcnplugin/ui/ISPPanelPopulator.kt +++ b/src/main/kotlin/com/github/warningimhack3r/intellijshadcnplugin/ui/ISPPanelPopulator.kt @@ -23,8 +23,7 @@ class ISPPanelPopulator(private val project: Project) { CoroutineScope(SupervisorJob() + Dispatchers.Default).async { return@async Pair( SourceScanner.findShadcnImplementation(project), - FileManager.getInstance(project).getVirtualFilesByName("package.json") - .filter { !it.parent.name.startsWith('.') }.size + FileManager.getInstance(project).getVirtualFilesByName("package.json").size ) }.asCompletableFuture().thenApplyAsync { (source, packageJsonCount) -> log.info("Shadcn implementation detected: $source, package.json count: $packageJsonCount")