diff --git a/server/gx-workflow-ls-format2/src/schema/definitions.ts b/server/gx-workflow-ls-format2/src/schema/definitions.ts index 45b13e9..93e8e83 100644 --- a/server/gx-workflow-ls-format2/src/schema/definitions.ts +++ b/server/gx-workflow-ls-format2/src/schema/definitions.ts @@ -195,12 +195,16 @@ export class EnumSchemaNode implements SchemaNode { return false; } + public get canBeAny(): boolean { + return this.name === "Any"; + } + public get typeRef(): string { return this._schemaEnum.name; } public matchesType(typeName: string): boolean { - return this.name === "Any" || this.symbols.includes(typeName); + return this.canBeAny || this.symbols.includes(typeName); } //Override toString for debugging purposes diff --git a/server/gx-workflow-ls-format2/src/services/completionService.ts b/server/gx-workflow-ls-format2/src/services/completionService.ts index feb374a..d147535 100644 --- a/server/gx-workflow-ls-format2/src/services/completionService.ts +++ b/server/gx-workflow-ls-format2/src/services/completionService.ts @@ -53,6 +53,8 @@ export class GxFormat2CompletionService { const position = textBuffer.getPosition(offset); const isPositionAfterColon = textBuffer.isPositionAfterToken(position, ":"); if (schemaNode instanceof EnumSchemaNode) { + if (schemaNode.canBeAny) return result; + schemaNode.symbols .filter((v) => v.startsWith(currentWord)) .forEach((value) => {