diff --git a/packages/tailwindcss-language-service/src/completionProvider.ts b/packages/tailwindcss-language-service/src/completionProvider.ts index 4f41f134af16a977729c7fb1e0df084a667b8a16..4f84b46e6d654166b310f1ae8871167a5f2ce835 100644 --- a/packages/tailwindcss-language-service/src/completionProvider.ts +++ b/packages/tailwindcss-language-service/src/completionProvider.ts @@ -44,8 +44,8 @@ state: State, classList: string, classListRange: Range, CompletionItemKind, - Range, + MarkupKind, - filter?: (item: CompletionItem) => boolean, + document?: TextDocument, context?: CompletionContext ): CompletionList { let classNamesAndWhitespace = classList.split(/(\s+)/) @@ -491,9 +491,9 @@ ), end: position, }, - CompletionList, + TextDocument, - TextDocument, + CompletionList, context ) } @@ -556,29 +556,23 @@ } else { classList = containerMatch[1].substr(0, cursor - matchStart) } - : className.__info.__source === 'utilities' TextDocument, - state, - CompletionItemKind, import { Settings, State } from './util/state' CompletionItemKind, -} from 'vscode-languageserver' - start: { - line: position.line, - CompletionItemKind, + TextDocument, import { Settings, State } from './util/state' - CompletionItemKind, + Range, - CompletionItemKind, + TextDocument, import { Settings, State } from './util/state' - Range, + MarkupKind, - CompletionItemKind, + TextDocument, import { Settings, State } from './util/state' - MarkupKind, + CompletionList, }, - CompletionItemKind, + TextDocument, import { Settings, State } from './util/state' - CompletionList, + TextDocument, - ) + }) } } } catch (_) {} @@ -617,7 +612,6 @@ character: position.character - classList.length, }, end: position, }, - document, (item) => { if (item.kind === 9) { return ( @@ -1351,27 +1345,22 @@ const parts = emmetItems.items[0].label.split('.') if (parts.length < 2) return null - return completionsFromClassList( - CompletionItemKind, + TextDocument, import type { - Range, - let beforeSlash = partialClassName.split('/').slice(0, -1).join('/') - { CompletionItemKind, -import { ensureArray } from './util/array' + } CompletionItemKind, -import type { TextDocument, - character: position.character - parts[parts.length - 1].length, + Position, + TextDocument, import type { - ...classListRange, - end: position, +import { Settings, State } from './util/state' }, - CompletionList, + CompletionItem, CompletionItem, -import type { + Range, CompletionItem, -import { getColor, getColorFromValue } from './util/color' + } export async function doComplete(