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

Provide hover for "parent" segments of a reference address #1224

Open
radeksimko opened this issue Mar 23, 2023 · 0 comments
Open

Provide hover for "parent" segments of a reference address #1224

radeksimko opened this issue Mar 23, 2023 · 0 comments
Labels
enhancement New feature or request textDocument/hover

Comments

@radeksimko
Copy link
Member

Context

As part of #496 and hashicorp/hcl-lang#185 in particular, it was decided to treat any reference as immutable sequence of segments separated by dots.

For example, you will get the following data regardless of where exactly you hover over google_compute_instance.name.network_interface[0].network_ip:

Screenshot 2023-03-23 at 09 50 54

Meaning that we always represent the whole address, or rather its very last segment.

Proposal

We could provide different hover data for different segments, for example:

  • google_compute_instance.name - object
  • google_compute_instance.name.network_interface - list of object
  • google_compute_instance.name.network_interface[0] - object
  • google_compute_instance.name.network_interface[0].network_ip - string (as before)
@radeksimko radeksimko added enhancement New feature or request textDocument/hover labels Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request textDocument/hover
Projects
None yet
Development

No branches or pull requests

1 participant