-
Notifications
You must be signed in to change notification settings - Fork 182
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
Responding to request for more feedback on code completion #528
Comments
Firstly thank you again @mattwelke for providing the detailed feedback in the Marketplace and for further explaining it here!
We do plan to support module completion beyond the static arguments such as FYI we track module completion on the LS side here: hashicorp/terraform-ls#93 so feel free to add anything more there and feel free to subscribe to that issue to get notified about progress.
Pre-filling required arguments is a functionality we want to provide. There was an attempt and a fruitful discussion about UX and some implementation details in hashicorp/terraform-ls#147 So while we don't support this today, I think we have a way forward and we have most of the data available. With that in mind I'm not sure whether pre-filling the block on Either way I'd welcome you to discuss this particular topic further or subscribe to hashicorp/terraform-ls#96 |
@radeksimko Looks like you folks have already recognized the need for these features. I followed those issues, thanks. |
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. |
I'm creating this issue in response to this response to a review I left on the Visual Studio Marketplace:
Here is my original feedback:
To expand on what I said further, here are examples of things that would be helpful for the extension to do:
If I'm working in a file detected as HTML, I can type
html
and then get a dropdown of emmets:I choose
html:5
and press enter:It would be neat if, upon loading the AWS provider, I had some AWS emmets available to me. For example, for the VPC module (https://registry.terraform.io/modules/terraform-aws-modules/vpc/aws/latest), I could type something like
tf_aws_vpc
and the text put onto the screen would be a basic VPC with all the required properties filled in, where I could tab through the places I need to put input (name, required properties, etc) like other emmets.The VS Code docs for Intellisense say:
It would also be nice if, upon starting to write a resource block (as described in https://learn.hashicorp.com/tutorials/terraform/aws-build?in=terraform/aws-get-started#resources), when I create the open brace, that acts as the trigger character and results in the extension filling in all the required properties, like the emmet described above. I could see this being more feasible to implement if the emmets aren't. At least all I have to remember is the resource type, and then the rest is filled in for me.
For example, the
aws_instance
resource from the AWS provider (https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance) has the following arguments marked as required:ami
instance_type
Therefore, if typed the following:
and then typed a
{
character, the block would become:Let me know if you need any more feedback.
The text was updated successfully, but these errors were encountered: