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

Intellisense not working for local block definitions #1246

Closed
TeamDman opened this issue Oct 12, 2022 · 2 comments
Closed

Intellisense not working for local block definitions #1246

TeamDman opened this issue Oct 12, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@TeamDman
Copy link

TeamDman commented Oct 12, 2022

Versions

Extension

Name: HashiCorp Terraform
Id: hashicorp.terraform
Description: Syntax highlighting and autocompletion for Terraform
Version: 2.24.2
Publisher: HashiCorp
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=HashiCorp.terraform

VS Code

Version: 1.72.0 (user setup)
Commit: 64bbfbf67ada9953918d72e1df2f4d8e537d340e
Date: 2022-10-04T23:20:39.912Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.19044
Sandboxed: No

Operating System

Linux myubuntuvm2 5.15.0-1020-azure #25~20.04.1-Ubuntu SMP Thu Sep 1 19:20:56 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Terraform Version

Terraform v1.3.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azuread v2.21.0
+ provider registry.terraform.io/hashicorp/azurerm v3.3.0
+ provider registry.terraform.io/hashicorp/time v0.7.2

Steps To Reproduce

  1. Create a resource
  2. Create a local block
  3. Intellisense doesn't work for local values referencing resources

Expected Behavior

image

image

Actual Behavior

image

@TeamDman TeamDman added the bug Something isn't working label Oct 12, 2022
@radeksimko radeksimko added enhancement New feature or request and removed bug Something isn't working labels Oct 12, 2022
@radeksimko
Copy link
Member

Hi @TeamDman
It is true we don't yet support "nested expressions". In your example, the "outer expression" under locals is object, as indicated by the { ... }. To put it very bluntly, IntelliSense currently only reliably works after the first =.

Screenshot 2022-10-12 at 16 24 01
Screenshot 2022-10-12 at 16 24 15

This is all work in progress as we track it under hashicorp/terraform-ls#496 which is in turn part of a bigger epic tracked in #641

As I believe this work to do is already covered in the mentioned issue, I'm going to close this one as a duplicate, but feel free to comment there, if there's anything you believe it does not cover and is related.

@radeksimko radeksimko closed this as not planned Won't fix, can't repro, duplicate, stale Oct 12, 2022
@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 Nov 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants