Add prompt() plugin API (#121)

This commit is contained in:
Gregory Schier
2024-10-01 08:32:42 -07:00
committed by GitHub
parent be60e4648a
commit 7e4f807f75
26 changed files with 220 additions and 82 deletions

View File

@@ -13,7 +13,7 @@ export type TwigCompletionOptionNamespace = {
export type TwigCompletionOptionFunction = {
args: { name: string }[];
aliases: string[];
aliases?: string[];
type: 'function';
};
@@ -65,7 +65,7 @@ export function twigCompletion({ options }: TwigCompletionConfig) {
if (matchSegments.length < optionSegments.length) {
return [
{
label: optionSegments.slice(0, matchSegments.length).join('.'),
label: optionSegments.slice(0, matchSegments.length).join('.') + '…',
apply: optionSegments.slice(0, matchSegments.length).join('.'),
type: 'namespace',
},