You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Start typing a resource in the config inside a for expression
Prompt for autocomplete suggestions
Select a suggestion
Expected Behavior
What was types in step 1 should be entirely replaced with the selected suggestion.
Actual Behavior
Selected suggestion is appended to what was typed in step 1.
In this screenshot, I typed aws_route_, then highlighted aws_route_table.private. The result after hitting enter:
It appends the selection to what I typed: aws_route_aws_route_table.private
Terraform Configuration
No response
Project Structure
No response
Gist
No response
Anything Else?
I don't see this behavior when doing an autocomplete in a local variable (e.g. foo = aws_route_ works as expected).
Workarounds
No response
References
No response
Help Wanted
I'm interested in contributing a fix myself
Community Note
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
The text was updated successfully, but these errors were encountered:
vincer
changed the title
Autocomplete appends the full choice to what's been typed instead of replacing
Autocomplete in for expression appends the full choice to what's been typed instead of replacing
Feb 1, 2024
Thanks for taking the time to report this issue. I'm able to reproduce the problem.
This is likely due to the lack of support for for expressions, see hashicorp/terraform-ls#527.
The good news is that there is a PR in review that will fix the issue and respect the prefix on completion: hashicorp/hcl-lang#368
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.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Extension Version
v2.29.3
VS Code Version
Version: 1.86.0 (Universal)
Commit: 05047486b6df5eb8d44b2ecd70ea3bdf775fd937
Date: 2024-01-31T10:29:15.765Z
Electron: 27.2.3
ElectronBuildId: 26495564
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Darwin arm64 23.2.0
Operating System
macOS 14.2.1 (23C71)
Terraform Version
1.7.0
Steps to Reproduce
Expected Behavior
What was types in step 1 should be entirely replaced with the selected suggestion.
Actual Behavior
Selected suggestion is appended to what was typed in step 1.
In this screenshot, I typed
aws_route_
, then highlightedaws_route_table.private
. The result after hitting enter:It appends the selection to what I typed:
aws_route_aws_route_table.private
Terraform Configuration
No response
Project Structure
No response
Gist
No response
Anything Else?
I don't see this behavior when doing an autocomplete in a local variable (e.g.
foo = aws_route_
works as expected).Workarounds
No response
References
No response
Help Wanted
Community Note
The text was updated successfully, but these errors were encountered: