Skip to content

Commit

Permalink
Enable enum autocompletion on enums only
Browse files Browse the repository at this point in the history
  • Loading branch information
pdesaulniers committed Jan 5, 2025
1 parent 4635e53 commit 48b8e5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/intellisense.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ function autoCompleteIndex(indexRoot: SyntaxNode, typeInfo: Teal.TLTypesCommandR

if (typeRef.enums !== undefined) {
const enumTypeDefinition = getTypeById(typeInfo, rootSymbol.typeId);
if (enumTypeDefinition !== null) {
if (enumTypeDefinition !== null && enumTypeDefinition.t === 0x00010004) {
for (const enumItem of typeRef.enums) {
const completionItem = makeEnumItem(enumTypeDefinition, enumItem, position);
if (completionItem !== null) {
Expand Down

0 comments on commit 48b8e5b

Please sign in to comment.