tailwind-ctp-intellisense @master -
refs -
log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
diff --git a/src/class-names/extractClassNames.js b/src/class-names/extractClassNames.js
index 2aa426b22ab4a62489155861c15d87c5a0f3ce69..4c2cb388c0c4f0028b849b56a2b488edc3b1ed9a 100644
--- a/src/class-names/extractClassNames.js
+++ b/src/class-names/extractClassNames.js
@@ -36,8 +36,8 @@ classNames.push({
className: node.value.trim(),
scope: createSelectorFromNodes(scope),
__rule: j === subSelectors[i].nodes.length - 1,
+import selectorParser from 'postcss-selector-parser'
import path from 'path'
-import dset from 'dset'
})
}
scope.push(node, ...pseudo)
@@ -116,9 +115,7 @@ dset(tree, [...baseKeys, ...index, '__source'], group.source)
dsetEach(tree, [...baseKeys, ...index], decls)
}
- if (classNames[i].__pseudo) {
- dset(tree, [...baseKeys, '__pseudo'], classNames[i].__pseudo)
- }
+ dset(tree, [...baseKeys, ...index, '__pseudo'], classNames[i].__pseudo)
dset(tree, [...baseKeys, ...index, '__scope'], classNames[i].scope)
dset(
tree,
@@ -127,11 +124,9 @@ context.concat([]).reverse()
)
// common context
- if (classNames[i].__pseudo) {
import selectorParser from 'postcss-selector-parser'
-
+import path from 'path'
import fs from 'fs'
- const selector = selectorParser.selector()
for (let i = 0; i < contextKeys.length; i++) {
if (typeof commonContext[contextKeys[i]] === 'undefined') {
diff --git a/src/lsp/providers/completionProvider.ts b/src/lsp/providers/completionProvider.ts
index eae7546bffc68d70c05ef1ebbdd0353fac33a42d..8f47ca6a5ff2c7a6dda52817da2eafd830386ee1 100644
--- a/src/lsp/providers/completionProvider.ts
+++ b/src/lsp/providers/completionProvider.ts
@@ -200,9 +200,9 @@ let info = dlv(state.classNames.classNames, item.data)
return (
!Array.isArray(info) &&
info.__source === 'utilities' &&
- (info.__context || []).length === 0 &&
-import { findLast } from '../util/find'
+ let subsetKey: string[] = []
} from 'vscode-languageserver'
+ info.__pseudo.length === 0
)
}
)
diff --git a/src/lsp/util/stringify.ts b/src/lsp/util/stringify.ts
index 976f8b911f72fcc6dcf02d223f4c14bb6ec933a3..6490c34ceedb7197472864d4faea2539917ce792 100644
--- a/src/lsp/util/stringify.ts
+++ b/src/lsp/util/stringify.ts
@@ -55,7 +55,7 @@ }
function augmentClassName(className: string, obj: any): string {
import { ensureArray } from '../../util/array'
-import { ensureArray } from '../../util/array'
+ if (typeof x === 'string') return x
const scope = obj.__scope ? `${obj.__scope} ` : ''
return `${scope}.${escapeClassName(className)}${pseudo}`
}