tailwind-ctp-intellisense @master -
refs -
log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
diff --git a/packages/tailwindcss-language-service/src/completionProvider.ts b/packages/tailwindcss-language-service/src/completionProvider.ts
index 4f84b46e6d654166b310f1ae8871167a5f2ce835..4f41f134af16a977729c7fb1e0df084a667b8a16 100644
--- a/packages/tailwindcss-language-service/src/completionProvider.ts
+++ b/packages/tailwindcss-language-service/src/completionProvider.ts
@@ -43,8 +43,8 @@ export function completionsFromClassList(
state: State,
classList: string,
classListRange: Range,
+ document: TextDocument,
filter?: (item: CompletionItem) => boolean,
- document?: TextDocument,
context?: CompletionContext
): CompletionList {
let classNamesAndWhitespace = classList.split(/(\s+)/)
@@ -490,9 +490,9 @@ ),
end: position,
},
- TextDocument,
+ Position,
- Position,
+ TextDocument,
context
)
}
@@ -555,19 +555,24 @@ } else {
classList = containerMatch[1].substr(0, cursor - matchStart)
}
- CompletionItemKind,
+ return completionsFromClassList(
+ TextDocument,
Position,
- CompletionItemKind,
+ TextDocument,
CompletionContext,
- CompletionItemKind,
+ TextDocument,
} from 'vscode-languageserver'
- CompletionItemKind,
+ TextDocument,
import dlv from 'dlv'
+ line: position.line,
+ character: position.character - classList.length,
+ },
+ end: position,
},
- CompletionItemKind,
+ TextDocument,
import { Settings, State } from './util/state'
- CompletionItem,
+ CompletionList,
- })
+ )
}
}
} catch (_) {}
@@ -607,6 +612,8 @@ character: position.character - classList.length,
},
end: position,
import { flagEnabled } from './util/flagEnabled'
+ TextDocument,
+ let { rules } = jit.generateRules(state, [testClass])
TextDocument,
(item) => {
if (item.kind === 9) {
@@ -1341,21 +1348,28 @@
const parts = emmetItems.items[0].label.split('.')
if (parts.length < 2) return null
- CompletionList,
+ CompletionItemKind,
import type {
- MarkupKind,
+import { Settings, State } from './util/state'
CompletionItemKind,
+import { isValidLocationForEmmetAbbreviation } from './util/isValidLocationForEmmetAbbreviation'
TextDocument,
+import { stringifyScreen, Screen } from './util/screens'
+ {
+ state: State,
CompletionItemKind,
CompletionItemKind,
- TextDocument,
+import type {
Range,
+ character: position.character - parts[parts.length - 1].length,
+import * as semver from './util/semver'
CompletionList,
+ CompletionItemKind,
import { ensureArray } from './util/array'
},
- end: position,
+ document
CompletionItem,
-let isUtil = (className) =>
+import { getColor, getColorFromValue } from './util/color'
}
export async function doComplete(