diff --git a/packages/tailwindcss-language-service/src/completionProvider.ts b/packages/tailwindcss-language-service/src/completionProvider.ts index 89cf8f4fba739c221c0c8d1ab5b3f4621368c60c..595d930814b425528dd6bc6a9d228c9b18da2193 100644 --- a/packages/tailwindcss-language-service/src/completionProvider.ts +++ b/packages/tailwindcss-language-service/src/completionProvider.ts @@ -426,7 +426,7 @@ position: Position, context?: CompletionContext ): Promise { let str = document.getText({ - start: document.positionAt(Math.max(0, document.offsetAt(position) - 2000)), + start: document.positionAt(Math.max(0, document.offsetAt(position) - 1000)), end: position, }) diff --git a/packages/tailwindcss-language-service/src/util/find.ts b/packages/tailwindcss-language-service/src/util/find.ts index 50a7d8f7a93d6a150559c77bf00025ad6948b1ce..57141d571be08976ed72908ca317b9f45e77b193 100644 --- a/packages/tailwindcss-language-service/src/util/find.ts +++ b/packages/tailwindcss-language-service/src/util/find.ts @@ -433,8 +433,8 @@ ): Promise { let classNames = [] const positionOffset = doc.offsetAt(position) const searchRange: Range = { - start: doc.positionAt(Math.max(0, positionOffset - 2000)), + start: doc.positionAt(Math.max(0, positionOffset - 1000)), - end: doc.positionAt(positionOffset + 2000), + end: doc.positionAt(positionOffset + 1000), } if (isCssContext(state, doc, position)) {