-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support step-based reference completion #492
Comments
This was referenced May 17, 2021
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Current Version
Context
References in HCL/Terraform have steps separated by
.
or brackets[
]
. As part of initial work on reference completion, references (including those special characters) are treated as opaque strings. For example when user requests completion in the following configthey are presented with all known attributes of
aws_instance.example
(and any other resources and data sources declared in the config), e.g.This could be overwhelming in larger configurations.
Use-cases
While I believe this can be valuable, I'm not sure yet how to best surface it to the users yet.
Step-based only completion
Provide user with just the first known reference step i.e. up to the first
.
or[
and treat.
and[
as completion trigger characters in that context.Using the example config above, user would only be presented with
aws_instance.example
(ignoring the builtin references such asterraform.workspace
). Then once they confirm the option, they'll be presented with next steps, e.g.credit_specification
, once they confirm and are presented withcpu_credits
.Step-based completion prioritized
Some users might like both fully expanded references and the above step-based completion. We could provide both and prioritize "parent" references in the list.
Using the example config above, user would be presented with the following candidates in that exact order
i.e.
aws_instance.example
is first on the list.Proposal
TODO
The text was updated successfully, but these errors were encountered: