hashicorp / vscode-terraform

HashiCorp Terraform VSCode extension
https://marketplace.visualstudio.com/items?itemName=HashiCorp.terraform
Mozilla Public License 2.0
928 stars 180 forks source link

Terraform Script Field Hover Data Type Issue #1851

Closed vynalavamshi closed 4 weeks ago

vynalavamshi commented 1 month ago

Extension Version

Latest version

VS Code Version

Lastest version

Operating System

Windows

Terraform Version

Latest

Steps to Reproduce

Hi

While I am working with Terraform script in VS Code, when I Hover on any Terraform script filed it should show me that particular data type of the field, but it is loading infinitely, can you please me on this issue

Expected Behavior

It should Show me that particular data type of the field of Terraform Script

Actual Behavior

While I am working with Terraform script in VS Code, when I Hover on any Terraform script filed it should show me that particular data type of the field, but it is loading infinitely, can you please me on this issue

Terraform Configuration

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurerm_storage_account" "example" {
  name                     = "storageaccountname"
  resource_group_name      = azurerm_resource_group.example.name
  location                 = azurerm_resource_group.example.location
  account_tier             = "Standard"
  account_replication_type = "GRS"

  tags = {
    environment = "staging"
  }
}

Project Structure

No response

Gist

No response

Anything Else?

Help me on this Please

Workarounds

No response

References

No response

Help Wanted

Community Note

dbanck commented 4 weeks ago

Hi @vynalavamshi,

Thanks for the report. Which field are you trying to hover over?

Can you please share the language server log output? And if possible, a screenshot of the actual behaviour? This will help us isolate the issue.

vynalavamshi commented 4 weeks ago

Hi @vynalavamshi,

Thanks for the report. Which field are you trying to hover over?

Can you please share the language server log output? And if possible, a screenshot of the actual behaviour? This will help us isolate the issue.

If I Hover on any of the filed of Terraform script

Expected result :

It should show that field data type

Actual Result:

Infinitely Loading Hover

dbanck commented 4 weeks ago

Can you please share the full language server log output when this issue occurs?

You can find it in VS Code's "Output" pane (View -> Output), then select "HashiCorp Terraform" at the top right.

vynalavamshi commented 4 weeks ago

Can you please share the full language server log output when this issue occurs?

You can find it in VS Code's "Output" pane (View -> Output), then select "HashiCorp Terraform" at the top right.

IMG_20241024_171338553.jpg

vynalavamshi commented 4 weeks ago

Can you please share the full language server log output when this issue occurs?

You can find it in VS Code's "Output" pane (View -> Output), then select "HashiCorp Terraform" at the top right.

IMG_20241024_171447863.jpg

IMG_20241024_171437669.jpg

dbanck commented 4 weeks ago

Thanks for providing more information!

It looks like you have several Terraform extensions installed. Can you please uninstall all but the HashiCorp Terraform one?

vynalavamshi commented 4 weeks ago

Thanks for providing more information!

It looks like you have several Terraform extensions installed. Can you please uninstall all but the HashiCorp Terraform one?

After uninstalled all, Except hashicorp Terraform I cannot see loading and I cannot see the field data type and no output is displayed it is empty and no problem is displayed

dbanck commented 4 weeks ago

That's odd! If the language server is running, there should be some log output available. You can find it here: https://user-images.githubusercontent.com/45985/239918316-8ad0a91b-c724-4f89-ae8f-1a992385bd77.png

If not, can you please share your user settings? Ideally as JSON CleanShot 2024-10-24 at 16 01 15@2x

vynalavamshi commented 4 weeks ago

That's odd! If the language server is running, there should be some log output available. You can find it here: https://user-images.githubusercontent.com/45985/239918316-8ad0a91b-c724-4f89-ae8f-1a992385bd77.png

If not, can you please share your user settings? Ideally as JSON CleanShot 2024-10-24 at 16 01 15@2x

IMG_20241024_201243135.jpg

Above is Output Snippet

+++ Below is Json file snippets +++

IMG_20241024_201309282.jpg

IMG_20241024_200756783.jpg

IMG_20241024_201327373.jpg

IMG_20241024_201334912.jpg

dbanck commented 4 weeks ago

Thanks for the screenshots! It looks like you have "terraform.languageServer.enabled": false, in your settings. Please try to remove this line or set it to true.

vynalavamshi commented 4 weeks ago

Thanks for the screenshots! It looks like you have "terraform.languageServer.enabled": false, in your settings. Please try to remove this line or set it to true.

Happy !

Thanks alot @dbanck bro, Working fine now.

dbanck commented 4 weeks ago

That's great to hear.

I'm going to close this issue for now. Feel free to open another one if you run into any more problems.