tailwind-ctp-intellisense @master -
refs -
log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Signature
-----BEGIN PGP SIGNATURE-----
wsBcBAABCAAQBQJktp5bCRBK7hj4Ov3rIwAAkuoIACU6h6xwzQ7s0O4YrEKI9g3i
MgawR2qtXa79seVm2rbIYGQk0ISs+VXYAcP3Cp3HePVIcRLWfNutLGLce5XWyRop
mAaZxopnUCzesu1jz5dLOiVUUx3JdRiPVl4UdbgQXIvW9/CONheuyJiw91DGF7c3
JQ1ajpbpzfruSVg1IYomxT8BrMGsQloEJh6RyZZf5x6uqr5qeYcc2Ll5/LEOGxJp
43Icqqs2PShOUu8AzTClKJEh/pqhU5rlFQBqIk9myFLSGjmIUWhHTPkCs+evraD8
pMVJxOSwJXF1QV9+uGNcgXZGfFHJxwwCd+GZpZn73chg8EzxahhFI7r9Qk+ytrA=
=sLwD
-----END PGP SIGNATURE-----
diff --git a/packages/tailwindcss-language-service/src/util/find.ts b/packages/tailwindcss-language-service/src/util/find.ts
index cf8cbcee83ad31a2bbdf75c520c7518f0cc4793c..cf32f66b550f0c3e1f1df62db3ea1a23cca97c29 100644
--- a/packages/tailwindcss-language-service/src/util/find.ts
+++ b/packages/tailwindcss-language-service/src/util/find.ts
@@ -296,11 +296,11 @@ range?: Range,
mode?: 'html' | 'css' | 'jsx',
includeCustom: boolean = true
): Promise<DocumentClassList[]> {
-import type { TextDocument } from 'vscode-languageserver-textdocument'
+import { DocumentClassName, DocumentClassList, State, DocumentHelperFunction } from './state'
-import { dedupeByRange, flatten } from './array'
+import { isJsxContext } from './js'
if (mode === 'css') {
classLists = findClassListsInCssRange(state, doc, range)
- } else {
+ } else if (mode === 'html' || mode === 'jsx') {
classLists = await findClassListsInHtmlRange(state, doc, mode, range)
}
return dedupeByRange([
@@ -450,6 +450,8 @@ } else if (isHtmlContext(state, doc, position)) {
classNames = await findClassNamesInRange(state, doc, searchRange, 'html')
} else if (isJsxContext(state, doc, position)) {
classNames = await findClassNamesInRange(state, doc, searchRange, 'jsx')
+ } else {
+ classNames = await findClassNamesInRange(state, doc, searchRange)
}
if (classNames.length === 0) {