Skip to content
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

no autocomplete on previous resources inputs, attributes etc. #92

Closed
cmeyertons opened this issue Oct 31, 2018 · 3 comments
Closed

no autocomplete on previous resources inputs, attributes etc. #92

cmeyertons opened this issue Oct 31, 2018 · 3 comments
Labels

Comments

@cmeyertons
Copy link

when i back reference a previous resource in the same module, i don't get any intellisense about that resource. if i'm not sure about something i have to go to the resources docs, which is a sub-optimal experience.

image

@paultyng paultyng transferred this issue from hashicorp/vscode-terraform May 12, 2020
@radeksimko radeksimko added the enhancement New feature or request label May 12, 2020
@radeksimko
Copy link
Member

The completion of references will be handled by the language server as part of #38 so I'd recommend subscribing to that issue.

With that said I'm not fully convinced if the completion will work the way you're suggesting.

#12 suggests that the server should not be returning all possible candidates, but instead return a limited number of candidates (say <100) and pick these based on what is relevant - e.g. filter items based on what was already written. So in your case you already wrote node which matches exactly 1 completion candidate, so we would probably display just that one candidate. Probably still better UX than just "No suggestions"? Alternatively we'd have to treat 100% match as no match and I'm not sure what UX side effects this may have.

Also the tricky thing here is that we'd need to calculate the byte range to replace with the confirmed candidate. Not impossible, just requires some extra effort. i.e. we need to make sure that when you'd Ctrl+Space anywhere in node and picked dns_prefix then we'd replace node with dns_prefix, and avoid just inserting dns_prefix in the middle of node.


Do you reckon it would be a lot of trouble if you were forced to <Backspace> a few times to get more completion candidates?

@radeksimko
Copy link
Member

Initial support for references was added in (now merged) #485 which will be released in coming days. The same PR also includes some description of features added and links to follow-up issues covering features which were omitted from that initial PR.

With that in mind I'm going to close this issue - keep an eye out for the upcoming update (0.17.0).

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants