Skip to content

Commit 105b8b8

Browse files
authored
Increase class search range (#760)
1 parent f3967a7 commit 105b8b8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/tailwindcss-language-service/src/completionProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ async function provideClassAttributeCompletions(
426426
context?: CompletionContext
427427
): Promise<CompletionList> {
428428
let str = document.getText({
429-
start: document.positionAt(Math.max(0, document.offsetAt(position) - 1000)),
429+
start: document.positionAt(Math.max(0, document.offsetAt(position) - 2000)),
430430
end: position,
431431
})
432432

packages/tailwindcss-language-service/src/util/find.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,8 @@ export async function findClassNameAtPosition(
433433
let classNames = []
434434
const positionOffset = doc.offsetAt(position)
435435
const searchRange: Range = {
436-
start: doc.positionAt(Math.max(0, positionOffset - 1000)),
437-
end: doc.positionAt(positionOffset + 1000),
436+
start: doc.positionAt(Math.max(0, positionOffset - 2000)),
437+
end: doc.positionAt(positionOffset + 2000),
438438
}
439439

440440
if (isCssContext(state, doc, position)) {

0 commit comments

Comments
 (0)