increase classlist search range (#414)
parent
d74a53ae9e
commit
251d32faaf
|
@ -334,7 +334,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) - 500)),
|
start: document.positionAt(Math.max(0, document.offsetAt(position) - 1000)),
|
||||||
end: position,
|
end: position,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -400,8 +400,8 @@ async function provideCustomClassNameCompletions(
|
||||||
const positionOffset = document.offsetAt(position)
|
const positionOffset = document.offsetAt(position)
|
||||||
|
|
||||||
const searchRange: Range = {
|
const searchRange: Range = {
|
||||||
start: document.positionAt(Math.max(0, positionOffset - 500)),
|
start: document.positionAt(Math.max(0, positionOffset - 1000)),
|
||||||
end: document.positionAt(positionOffset + 500),
|
end: document.positionAt(positionOffset + 1000),
|
||||||
}
|
}
|
||||||
|
|
||||||
let str = document.getText(searchRange)
|
let str = document.getText(searchRange)
|
||||||
|
|
|
@ -379,8 +379,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 - 500)),
|
start: doc.positionAt(Math.max(0, positionOffset - 1000)),
|
||||||
end: doc.positionAt(positionOffset + 500),
|
end: doc.positionAt(positionOffset + 1000),
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isCssContext(state, doc, position)) {
|
if (isCssContext(state, doc, position)) {
|
||||||
|
|
Loading…
Reference in New Issue