Increase class search range (#760)
parent
f3967a72ad
commit
105b8b86ec
|
@ -426,7 +426,7 @@ async function provideClassAttributeCompletions(
|
||||||
context?: CompletionContext
|
context?: CompletionContext
|
||||||
): Promise<CompletionList> {
|
): Promise<CompletionList> {
|
||||||
let str = document.getText({
|
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,
|
end: position,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -433,8 +433,8 @@ export async function findClassNameAtPosition(
|
||||||
let classNames = []
|
let classNames = []
|
||||||
const positionOffset = doc.offsetAt(position)
|
const positionOffset = doc.offsetAt(position)
|
||||||
const searchRange: Range = {
|
const searchRange: Range = {
|
||||||
start: doc.positionAt(Math.max(0, positionOffset - 1000)),
|
start: doc.positionAt(Math.max(0, positionOffset - 2000)),
|
||||||
end: doc.positionAt(positionOffset + 1000),
|
end: doc.positionAt(positionOffset + 2000),
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isCssContext(state, doc, position)) {
|
if (isCssContext(state, doc, position)) {
|
||||||
|
|
Loading…
Reference in New Issue