Don't show unnamed variables in autocomplete

This commit is contained in:
Gregory Schier
2024-08-10 07:09:23 -07:00
parent d5b0b5481c
commit dab10d79fe
2 changed files with 1 additions and 35 deletions

View File

@@ -40,6 +40,7 @@ export function twigCompletion({ options }: TwigCompletionConfig) {
validFor: () => true, // Not really sure why this is all it needs
from: toMatch.from,
options: options
.filter((v) => v.name.trim())
.map((v) => ({
label: toStartOfVariable ? `${openTag}${v.name}${closeTag}` : v.name,
apply: `${openTag}${v.name}${closeTag}`,