Fix initial apply text

This commit is contained in:
Gregory Schier
2024-08-22 12:49:42 -07:00
parent 11f811d900
commit 8d03ba5bdd

View File

@@ -55,10 +55,10 @@ export function twigCompletion({ options }: TwigCompletionConfig) {
options: options
.filter((v) => v.name.trim())
.map((v) => {
const tagSyntax = openTag + v.label + closeTag;
const inner = v.type === 'function' ? `${v.name}()` : v.name;
return {
label: v.label,
apply: tagSyntax,
apply: openTag + inner + closeTag,
type: v.type === 'variable' ? 'variable' : 'function',
matchLen: matchLen,
};