diff --git a/packages/language-server/src/lib/documents/configLoader.ts b/packages/language-server/src/lib/documents/configLoader.ts index 43e7d1c55..35bd1c043 100644 --- a/packages/language-server/src/lib/documents/configLoader.ts +++ b/packages/language-server/src/lib/documents/configLoader.ts @@ -83,7 +83,9 @@ export class ConfigLoader { try { const pathResults = this.globSync('**/svelte.config.{js,cjs,mjs}', { cwd: directory, - ignore: ['**/node_modules/**'] + // the second pattern is necessary because else fast-glob treats .tmp/../node_modules/.. as a valid match for some reason + ignore: ['**/node_modules/**', '**/.*/**'], + onlyFiles: true }); const someConfigIsImmediateFileInDirectory = pathResults.length > 0 && pathResults.some((res) => !this.path.dirname(res));