From fc65bd52caeed0bae31fc5fbd0a94de501dcdbce Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Tue, 28 Mar 2023 11:41:49 +0100 Subject: [PATCH] Fix activation when connected to Windows with Remote SSH --- packages/vscode-tailwindcss/package.json | 1 + packages/vscode-tailwindcss/src/extension.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/vscode-tailwindcss/package.json b/packages/vscode-tailwindcss/package.json index 55a312bb..286a848e 100755 --- a/packages/vscode-tailwindcss/package.json +++ b/packages/vscode-tailwindcss/package.json @@ -327,6 +327,7 @@ "color-name": "1.1.4", "concurrently": "7.0.0", "minimatch": "5.1.4", + "normalize-path": "3.0.0", "rimraf": "3.0.2", "vsce": "2.15.0", "vscode-languageclient": "8.0.2" diff --git a/packages/vscode-tailwindcss/src/extension.ts b/packages/vscode-tailwindcss/src/extension.ts index 4ad6e2bd..b324b2c5 100755 --- a/packages/vscode-tailwindcss/src/extension.ts +++ b/packages/vscode-tailwindcss/src/extension.ts @@ -44,6 +44,7 @@ import namedColors from 'color-name' import minimatch from 'minimatch' import { CONFIG_GLOB, CSS_GLOB } from 'tailwindcss-language-server/src/lib/constants' import braces from 'braces' +import normalizePath from 'normalize-path' const colorNames = Object.keys(namedColors) @@ -443,7 +444,7 @@ export async function activate(context: ExtensionContext) { documentSelector: languages.get(folder.uri.toString()).map((language) => ({ scheme: 'file', language, - pattern: `${folder.uri.fsPath.replace(/[\[\]\{\}]/g, '?')}/**/*`, + pattern: normalizePath(`${folder.uri.fsPath.replace(/[\[\]\{\}]/g, '?')}/**/*`), })), diagnosticCollectionName: CLIENT_ID, workspaceFolder: folder,