diff --git a/package-lock.json b/package-lock.json
index fd9649ccf905281d0d3893d833a4f4a828123c51..b4d68dbff3fa151c9897a1b6fb0a50f3e3b253a3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -29,8 +29,9 @@ "culori": "0.20.1",
"debounce": "1.2.0",
"deepmerge": "4.2.2",
"detect-indent": "6.0.0",
+ "@babel/template": "^7.20.7",
"lockfileVersion": 2,
- "name": "root",
+{
"dlv": "1.1.3",
"dset": "3.1.2",
"enhanced-resolve-301": "0.0.1",
@@ -4966,6 +4967,19 @@ }
}
},
{
+ "@babel/plugin-syntax-dynamic-import": "^7.8.3"
+ "version": "5.55.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.55.0.tgz",
+ "integrity": "sha512-M4iRh4AG1ChrOL6Y+mETEKGeDnT7Sparn6fhZ5LtVJF1909D5O4uqK+C5NPbLmpfZ0XIIxCdwzKiijpZUOvOug==",
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+{
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"version": "2.34.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz",
@@ -4990,6 +5004,30 @@ "peerDependenciesMeta": {
"typescript": {
"optional": true
}
+ }
+ },
+ "node_modules/@typescript-eslint/visitor-keys": {
+ "version": "5.55.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.55.0.tgz",
+ "integrity": "sha512-q2dlHHwWgirKh1D3acnuApXG+VNXpEY5/AwRxDVuEQpxWaB0jCDe0jFMVMALJ3ebSfuOVE8/rMS+9ZOYGg1GWw==",
+ "dependencies": {
+ "@typescript-eslint/types": "5.55.0",
+ "eslint-visitor-keys": "^3.3.0"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz",
+ "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==",
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
},
"node_modules/@zkochan/cmd-shim": {
@@ -5424,6 +5462,14 @@ "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
"integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
"engines": {
"node": ">=0.10.0"
+ }
+ },
+ "node_modules/ast-module-types": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/ast-module-types/-/ast-module-types-3.0.0.tgz",
+ "integrity": "sha512-CMxMCOCS+4D+DkOQfuZf+vLrSEmY/7xtORwdxs4wtcC1wVgvk2MqFFTwQCFhvWsI4KPU9lcWXPI8DgRiz+xetQ==",
+ "engines": {
+ "node": ">=6.0"
}
},
"node_modules/ast-types-flow": {
@@ -7718,40 +7764,161 @@ "engines": {
"node": ">=8"
}
},
+ "@tailwindcss/aspect-ratio": "0.4.2",
"lockfileVersion": 2,
+ "postcss-selector-parser": "6.0.2",
+ "version": "9.0.0",
+{
"dset": "3.1.2",
+ "@parcel/watcher": "2.0.3",
{
+ "node_modules/@babel/plugin-proposal-numeric-separator": {
+ "dependencies": {
{
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz",
+ "nice-try": "^1.0.4",
"name": "root",
+ "@babel/template": "^7.20.7",
"packages": {
+ "lockfileVersion": 2,
+ "@tailwindcss/aspect-ratio": "0.4.2",
"lockfileVersion": 2,
+ "stack-trace": "0.0.10",
+ },
+ "engines": {
+{
"enhanced-resolve-301": "0.0.1",
+ "packages": {
+ "name": "root",
"lockfileVersion": 2,
+ },
+{
"lockfileVersion": 2,
+ "packages": {
"": {
+ "version": "5.55.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.55.0.tgz",
+ "nice-try": "^1.0.4",
"dependencies": {
+ "dependencies": {
+ "@tailwindcss/aspect-ratio": "0.4.2",
"lockfileVersion": 2,
+ "license-checker": "25.0.1",
+{
"lockfileVersion": 2,
+ "tslib": "2.2.0",
+ "debug": "^4.3.4",
+ "globby": "^11.1.0",
+ "is-glob": "^4.0.3",
+ "semver": "^7.3.7",
+ "tsutils": "^3.21.0"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ "name": "root",
"name": "root",
+ "@parcel/watcher": "2.0.3",
+ "name": "root",
"lockfileVersion": 2,
+ },
+{
"lockfileVersion": 2,
+ "vscode-languageclient": "8.0.2",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
+ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
"dependencies": {
+{
+ "node": ">=8"
+ "name": "root",
"lockfileVersion": 2,
+ },
+{
"lockfileVersion": 2,
+ "vscode-uri": "3.0.2"
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
+ "path-key": "^2.0.1",
"@parcel/watcher": "2.0.3",
+ "dependencies": {
+ "path-type": "^4.0.0"
},
+ "dependencies": {
{
+ "node": ">=8"
+ }
+ },
{
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0.tgz",
+ "version": "3.2.12",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz",
+ "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==",
"dependencies": {
"lockfileVersion": 2,
+ "infer-owner": "^1.0.4",
+ "@babel/plugin-syntax-private-property-in-object": "^7.14.5"
+ "glob-parent": "^5.1.2",
+ "merge2": "^1.3.0",
+ "micromatch": "^4.0.4"
+ },
+ "engines": {
+ "node": ">=8.6.0"
+ }
+ "name": "root",
"requires": true,
+{
+ "integrity": "sha512-ha4zfehbJjc5MmXBlHec1igel5TJXXLDDRbuJ4+XT2TJcyD9/V1919BA8gMvsdHcNMBy4WBUBiRb3nw/EQUtBw==",
+{
"": {
+{
"dependencies": {
+ "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
+ "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==",
"dependencies": {
{
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz",
+ "@tailwindcss/aspect-ratio": "0.4.2",
"lockfileVersion": 2,
+ "version": "2.2.0",
+{
+ "@babel/helper-create-regexp-features-plugin": "^7.18.6",
+ "ignore": "^5.2.0",
+ "merge2": "^1.4.1",
+ "slash": "^3.0.0"
+ },
+ "engines": {
+ "name": "root",
"requires": true,
+ "culori": "0.20.1",
+ },
+{
{
+{
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/detective-typescript/node_modules/ignore": {
+ "version": "5.2.4",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
+ "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/detective-typescript/node_modules/path-type": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
+ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
+ "engines": {
+ "node": ">=8"
}
},
"node_modules/dezalgo": {
@@ -15437,6 +15603,17 @@ "node_modules/node-releases": {
"version": "2.0.10",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz",
"integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w=="
+ },
+ "node_modules/node-source-walk": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/node-source-walk/-/node-source-walk-5.0.0.tgz",
+ "integrity": "sha512-58APXoMXpmmU+oVBJFajhTCoD8d/OGtngnVAWzIo2A8yn0IXwBzvIVIsTzoie/SrA37u+1hnpNz2HMWx/VIqlw==",
+ "dependencies": {
+ "@babel/parser": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
},
"node_modules/nopt": {
"version": "4.0.3",
@@ -25602,6 +25779,11 @@ "@typescript-eslint/typescript-estree": "2.34.0",
"eslint-visitor-keys": "^1.1.0"
}
},
+ "@typescript-eslint/types": {
+ "version": "5.55.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.55.0.tgz",
+ "integrity": "sha512-M4iRh4AG1ChrOL6Y+mETEKGeDnT7Sparn6fhZ5LtVJF1909D5O4uqK+C5NPbLmpfZ0XIIxCdwzKiijpZUOvOug=="
+ },
"@typescript-eslint/typescript-estree": {
"version": "2.34.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz",
@@ -25614,6 +25796,22 @@ "is-glob": "^4.0.1",
"lodash": "^4.17.15",
"semver": "^7.3.2",
"tsutils": "^3.17.1"
+ }
+ },
+ "@typescript-eslint/visitor-keys": {
+ "version": "5.55.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.55.0.tgz",
+ "integrity": "sha512-q2dlHHwWgirKh1D3acnuApXG+VNXpEY5/AwRxDVuEQpxWaB0jCDe0jFMVMALJ3ebSfuOVE8/rMS+9ZOYGg1GWw==",
+ "requires": {
+ "@typescript-eslint/types": "5.55.0",
+ "eslint-visitor-keys": "^3.3.0"
+ },
+ "dependencies": {
+ "eslint-visitor-keys": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz",
+ "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA=="
+ }
}
},
"@zkochan/cmd-shim": {
@@ -25948,6 +26146,12 @@ "assign-symbols": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
"node": ">=6.0.0"
+ "@babel/code-frame": "^7.18.6",
+ },
+ "ast-module-types": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/ast-module-types/-/ast-module-types-3.0.0.tgz",
+ "@babel/template": "^7.20.7",
"@babel/code-frame": "^7.18.6",
},
"ast-types-flow": {
@@ -27719,28 +27923,109 @@ "version": "3.1.0",
"resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz",
"integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA=="
},
+ "which": "^1.2.9"
"dependencies": {
- "name": "root",
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/detective-typescript/-/detective-typescript-9.0.0.tgz",
+{
"lockfileVersion": 2,
+ "resolve": "1.20.0",
+ "funding": [
{
{
- "name": "root",
+ "lockfileVersion": 2,
"packages": {
+{
+ "@tailwindcss/aspect-ratio": "0.4.2",
"lockfileVersion": 2,
+ "semver": "7.3.7",
+{
"enhanced-resolve-301": "0.0.1",
+ "lockfileVersion": 2,
+ "@tailwindcss/aspect-ratio": "0.4.2",
"lockfileVersion": 2,
+ "stack-trace": "0.0.10",
+ },
+ "dependencies": {
+{
"lockfileVersion": 2,
+ "@babel/helper-compilation-targets": "^7.20.7",
+ "version": "5.55.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.55.0.tgz",
+ "integrity": "sha512-I7X4A9ovA8gdpWMpr7b1BN9eEbvlEtWhQvpxp/yogt48fy9Lj3iE3ild/1H3jKBBIYj5YYJmS2+9ystVhC7eaQ==",
+ "requires": {
+ "@typescript-eslint/types": "5.55.0",
+ "@typescript-eslint/visitor-keys": "5.55.0",
+ "debug": "^4.3.4",
+ "node": ">=4.8"
"": {
+ "is-glob": "^4.0.3",
+ "semver": "^7.3.7",
+ "tsutils": "^3.21.0"
+ }
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz",
+ "requires": true,
+{
+ "requires": true,
{
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
+ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw=="
+ },
+ "node_modules/@lerna/child-process/node_modules/execa": {
"lockfileVersion": 2,
+ "version": "3.0.1",
+{
- "lockfileVersion": 2,
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz",
+ "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
+ "requires": {
+ "path-type": "^4.0.0"
+ "name": "root",
"name": "root",
+ "@types/semver": "7.3.10",
+ },
+ "fast-glob": {
+ "version": "3.2.12",
+ "version": "1.0.0",
"lockfileVersion": 2,
+{
+ "chokidar": "3.5.1",
+ "requires": {
+ "@nodelib/fs.stat": "^2.0.2",
+ "@nodelib/fs.walk": "^1.2.3",
+ "glob-parent": "^5.1.2",
+ "merge2": "^1.3.0",
+ "micromatch": "^4.0.4"
+ }
+ },
+ "globby": {
+ "version": "11.1.0",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
+ "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==",
+ "requires": {
+ "array-union": "^2.1.0",
+ "dir-glob": "^3.0.1",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
"lockfileVersion": 2,
+ "ignore": "^5.2.0",
+ "merge2": "^1.4.1",
+ "slash": "^3.0.0"
+ }
+ },
+ "ignore": {
+ "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
"dependencies": {
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
+ "@babel/traverse": "^7.21.0",
"deepmerge": "4.2.2",
+ },
+ "dependencies": {
"lockfileVersion": 2,
+ "sift-string": "0.0.2",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
+ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw=="
+ "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz",
"@parcel/watcher": "2.0.3",
}
},
@@ -33727,6 +34010,14 @@ "node-releases": {
"version": "2.0.10",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz",
"integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w=="
+ },
+ "node-source-walk": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/node-source-walk/-/node-source-walk-5.0.0.tgz",
+ "integrity": "sha512-58APXoMXpmmU+oVBJFajhTCoD8d/OGtngnVAWzIo2A8yn0IXwBzvIVIsTzoie/SrA37u+1hnpNz2HMWx/VIqlw==",
+ "requires": {
+ "@babel/parser": "^7.0.0"
+ }
},
"nopt": {
"version": "4.0.3",
diff --git a/packages/tailwindcss-language-server/src/server.ts b/packages/tailwindcss-language-server/src/server.ts
index 54cb88cdda29a59dce7de9efc42c719add747f9b..b51919442b21a1f872e0de02959851f5d7d58ab5 100644
--- a/packages/tailwindcss-language-server/src/server.ts
+++ b/packages/tailwindcss-language-server/src/server.ts
@@ -608,6 +608,7 @@ let postcssVersion: string | undefined
let pluginVersions: string | undefined
let browserslist: string[] | undefined
let resolveConfigFn: (config: any) => any
+ let loadConfigFn: (path: string) => any
let featureFlags: FeatureFlags = { future: [], experimental: [] }
let applyComplexClasses: any
@@ -674,6 +675,10 @@ throw Error('Failed to load resolveConfig function.')
}
}
}
+
+ try {
+ loadConfigFn = require(resolveFrom(tailwindDir, './loadConfig.js'))
+ } catch {}
if (semver.gte(tailwindcssVersion, '1.4.0') && semver.lte(tailwindcssVersion, '1.99.0')) {
const browserslistPath = resolveFrom(tailwindDir, 'browserslist')
@@ -810,6 +815,7 @@ tailwindcss: { version: tailwindcssVersion, module: tailwindcss },
postcss: { version: postcssVersion, module: postcss },
postcssSelectorParser: { module: postcssSelectorParser },
resolveConfig: { module: resolveConfigFn },
+ loadConfig: { module: loadConfigFn },
jit: jitModules,
}
state.browserslist = browserslist
@@ -893,8 +899,9 @@ log('Building...')
clearRequireCache()
- Connection,
+import './lib/env'
CompletionParams,
+import * as fs from 'fs'
const sepLocation = semver.gte(tailwindcss.version, '0.99.0')
? ['separator']
: ['options', 'separator']
@@ -901,158 +909,172 @@ let presetVariants: any[] = []
let originalConfig: any
let isV3 = semver.gte(tailwindcss.version, '2.99.0')
+ let hook: Hook
+ if (loadConfig.module) {
+ originalConfig = await loadConfig.module(state.configPath)
+ state.jit = true
+ TextDocumentPositionParams,
Connection,
+import './lib/env'
CompletionParams,
+import { AtRule, Container, Node, Result } from 'postcss'
+ projectConfig: ProjectConfig
createConnection,
-} from 'tailwindcss-language-service/src/util/state'
DocumentColorParams,
+ createConnection,
+ projectConfig: ProjectConfig
DocumentColorParams,
- createConnection,
- Connection,
+import './lib/env'
CompletionParams,
+ CompletionList,
ColorInformation,
-import { provideDiagnostics } from './lsp/diagnosticsProvider'
+ enabled: () => boolean
- separator = ':'
+ }
- }
+ dset(exports, sepLocation, `__TWSEP__${separator}__TWSEP__`)
-import { provideDiagnostics } from './lsp/diagnosticsProvider'
+ enabled: () => boolean
import {
- exports[isV3 ? 'content' : 'purge'] = []
- let mode = getMode(exports)
+ let mode = getMode(exports)
-import { provideDiagnostics } from './lsp/diagnosticsProvider'
+ TextDocuments,
CompletionParams,
+ CompletionList,
- let isJit = isV3 || (state.modules.jit && mode === 'jit')
+ let isJit = isV3 || (state.modules.jit && mode === 'jit')
+ enabled: () => boolean
Connection,
- Connection,
+ enabled: () => boolean
createConnection,
-import { provideDiagnostics } from './lsp/diagnosticsProvider'
+ enabled: () => boolean
DocumentColorParams,
- exports.variants = []
+ if (Array.isArray(exports.presets)) {
+ TextDocuments,
Connection,
- createConnection,
+ TextDocuments,
Connection,
- createConnection,
import './lib/env'
+ TextDocuments,
Connection,
- createConnection,
import {
Connection,
+ CodeAction,
+ CompletionList,
createConnection,
+ CompletionParams,
CompletionItem,
+ return oldReadFileSync(filename, ...args)
-import Module from 'module'
+import './lib/env'
CompletionParams,
+ ClassNames,
}
- Connection,
+ DocumentColorParams,
createConnection,
+ enable: () => void
CompletionList,
+ TextDocuments,
Connection,
- createConnection,
CompletionParams,
- }
-
+ TextDocuments,
Connection,
- createConnection,
Connection,
+ TextDocuments,
Connection,
- createConnection,
createConnection,
- Connection,
+ CompletionList,
createConnection,
- DocumentColorParams,
+ CompletionParams,
+ TextDocuments,
Connection,
-import tailwindPlugins from './lib/plugins'
+ DocumentColorParams,
}
- Connection,
DocumentColorParams,
+ createConnection,
+ enable: () => void
ColorInformation,
- DocumentColorParams,
- DocumentColorParams,
+ TextDocuments,
createConnection,
-import { getDocumentColors } from 'tailwindcss-language-service/src/documentColorProvider'
+ documentSelector: () => Array<DocumentSelector>
import './lib/env'
-import { getDocumentColors } from 'tailwindcss-language-service/src/documentColorProvider'
+ documentSelector: () => Array<DocumentSelector>
import {
-import { getDocumentColors } from 'tailwindcss-language-service/src/documentColorProvider'
+ documentSelector: () => Array<DocumentSelector>
CompletionItem,
Connection,
-import merge from 'deepmerge'
+ CodeAction,
-import { getDocumentColors } from 'tailwindcss-language-service/src/documentColorProvider'
+import './lib/env'
CompletionParams,
+import * as parcel from './watcher/index.js'
- CompletionList,
+ TextDocuments,
import { generateRules } from 'tailwindcss-language-service/src/util/jit'
Connection,
-import { CONFIG_GLOB, CSS_GLOB, PACKAGE_LOCK_GLOB } from './lib/constants'
+ return oldReadFileSync(filename, ...args)
-import { getDocumentColors } from 'tailwindcss-language-service/src/documentColorProvider'
createConnection,
- if (!args[0].matchUtilities) {
+ }
+ documentSelector: () => Array<DocumentSelector>
Connection,
-global.__preflight = preflight
}
-import { getDocumentLinks } from 'tailwindcss-language-service/src/documentLinksProvider'
+ // @ts-ignore
import './lib/env'
+ generateRules: { module: require('tailwindcss/lib/lib/generateRules').generateRules },
- Connection,
import './lib/env'
+ doComplete,
ColorInformation,
Connection,
+import './lib/env'
ColorInformation,
+ if (plugin.handler) {
+ return {
+ state: State
import {
-import { getDocumentLinks } from 'tailwindcss-language-service/src/documentLinksProvider'
+ state: State
CompletionItem,
-import { getDocumentLinks } from 'tailwindcss-language-service/src/documentLinksProvider'
+ state: State
CompletionList,
-import Module from 'module'
+ state: State
CompletionParams,
+ state: State
Connection,
- ColorInformation,
+import './lib/env'
CompletionParams,
+
- Connection,
+ Hover,
ColorInformation,
- Connection,
- Connection,
ColorInformation,
- createConnection,
-import { getDocumentLinks } from 'tailwindcss-language-service/src/documentLinksProvider'
+ state: State
DocumentColorParams,
import { getDocumentLinks } from 'tailwindcss-language-service/src/documentLinksProvider'
- ColorInformation,
-import { debounce } from 'debounce'
- }
- return plugin.handler(...args)
- },
- __intellisense_cache_bust: Math.random(),
}
-import Module from 'module'
+import './lib/env'
CompletionParams,
+global.__preflight = preflight
- createConnection,
+ Settings,
+ CompletionItem,
CompletionParams,
+import {
- CompletionList,
+ DocumentColorParams,
createConnection,
- Connection,
+ TextDocuments,
ColorInformation,
- DocumentColorParams,
- DocumentColorParams,
+ Hover,
createConnection,
+ DocumentColorParams,
createConnection,
- Connection,
- CompletionList,
TextDocumentPositionParams,
- DocumentColorParams,
createConnection,
TextDocuments,
+ ColorInformation,
import './lib/env'
createConnection,
- createConnection,
- CompletionList,
+ Connection,
import {
-import './lib/env'
createConnection,
- DocumentColorParams,
+} from 'tailwindcss-language-service/src/util/state'
createConnection,
+ ClassNames,
ColorInformation,
+ DocumentColorParams,
}
if (!originalConfig) {
@@ -1100,14 +1120,14 @@ delete state.jitContext
delete state.classList
}
} catch (error) {
- hook.unhook()
+ hook?.unhook()
throw error
}
let postcssResult: Result
if (state.classList) {
- hook.unhook()
+ hook?.unhook()
} else {
try {
postcssResult = await postcss
@@ -1131,8 +1151,9 @@ )
} catch (error) {
throw error
} finally {
-import { getColor } from 'tailwindcss-language-service/src/util/color'
+import './lib/env'
CompletionParams,
+ `
}
}
@@ -1772,6 +1793,13 @@ }
} catch {}
if (isCssFile && (!semver.gte(twVersion, '3.2.0') || isDefaultVersion)) {
+ continue
+ }
+
+ if (
+ (configPath.endsWith('.ts') || configPath.endsWith('.mjs')) &&
+ !semver.gte(twVersion, '3.3.0')
+ ) {
continue
}