From 232bdc976768120ff395f0ea18e6c7020644c543 Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Tue, 21 Aug 2018 14:33:37 +0100 Subject: [PATCH] fix config glob to search folders other than root (#1) --- src/extension.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index c084302..b334780 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -6,7 +6,8 @@ const tailwindClassNames = require('tailwind-class-names') const dlv = require('dlv') const Color = require('color') -const CONFIG_GLOB = '{tailwind,tailwind.config,tailwind-config,.tailwindrc}.js' +const CONFIG_GLOB = + '**/{tailwind,tailwind.config,tailwind-config,.tailwindrc}.js' const JS_TYPES = ['typescriptreact', 'javascript', 'javascriptreact'] const HTML_TYPES = [ 'html', @@ -36,7 +37,7 @@ export async function activate(context: vscode.ExtensionContext) { let intellisense = new TailwindIntellisense(tw) context.subscriptions.push(intellisense) - let watcher = vscode.workspace.createFileSystemWatcher(`**/${CONFIG_GLOB}`) + let watcher = vscode.workspace.createFileSystemWatcher(CONFIG_GLOB) watcher.onDidChange(onFileChange) watcher.onDidCreate(onFileChange)