Increase class search range (#760)

master
Brad Cornes 2023-04-17 12:09:05 +01:00 committed by GitHub
parent f3967a72ad
commit 105b8b86ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -426,7 +426,7 @@ async function provideClassAttributeCompletions(
context?: CompletionContext
): Promise<CompletionList> {
let str = document.getText({
start: document.positionAt(Math.max(0, document.offsetAt(position) - 1000)),
start: document.positionAt(Math.max(0, document.offsetAt(position) - 2000)),
end: position,
})

View File

@ -433,8 +433,8 @@ export async function findClassNameAtPosition(
let classNames = []
const positionOffset = doc.offsetAt(position)
const searchRange: Range = {
start: doc.positionAt(Math.max(0, positionOffset - 1000)),
end: doc.positionAt(positionOffset + 1000),
start: doc.positionAt(Math.max(0, positionOffset - 2000)),
end: doc.positionAt(positionOffset + 2000),
}
if (isCssContext(state, doc, position)) {