[Feature request] Add Enum literals to autocomplete when type-appropriate #2583
nuiva
started this conversation in
Enhancement
Replies: 3 comments
-
Marking as a feature request; this would be a "deep completion", as the thing you'd need to suggest is the full Or, the first type-aware completion where we suggest things first if they would type check. |
Beta Was this translation helpful? Give feedback.
0 replies
This comment was marked as spam.
This comment was marked as spam.
-
Moving this issue to discussion as an enhancement request for comments and upvotes. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like the autocomplete to infer from types that I'm about to write an Enum value and immediately suggest the possible literals in the Enum class. Consider the following example:
In this example, I want the autocomplete to include
ENUM_VAL_A
andENUM_VAL_B
(which expand toTestEnum.ENUM_VAL_A
) and I think these literals should be at the top of the list. The current behaviour is that I must typeTestEnum
(which isn't even guaranteed to be at the top of the suggestion list) beforeENUM_VAL_A
and B are included in the autocomplete suggestions.Similarly, if I define
then the literals should be suggested for the parameters of
f
.Beta Was this translation helpful? Give feedback.
All reactions