Vscode-terraform: Code complete not working in vs code

Created on 12 Jun 2020  ยท  4Comments  ยท  Source: hashicorp/vscode-terraform

I have version 2.0.1 of the extension installed in vs code 1.46.0

I can't get the code completion to work.

I type a resource block in azurerm, and nothing happens to assist me.

Most helpful comment

There appears to be a lot of issues with the new 2.0.1 version. To summarize my understanding thus far:

  • every old feature besides highlighting (formatting, auto-complete) is now configured through the language server
  • there is a stable language server supporting terraform 0.12, however when trying to enable the language server, 2.0.1 requires a .terraform file in the root of you VScode folder that you have opened (annoying for users that open a larger project where tf is a sub folder)
  • some people have circumvented the above issue by adding a dummy .terraform file in their root that they work in, but frankly this seems like a hack - and ostensibly would require adding .terraform files to any parent folder that opens to be "root" when opening it in VScode
  • personally I downloaded the vsix for 1.4.0 and will be using that (despite the lack of 0.12 language support) until all these issue get fixed up

All 4 comments

I open a issue like that at #383

There appears to be a lot of issues with the new 2.0.1 version. To summarize my understanding thus far:

  • every old feature besides highlighting (formatting, auto-complete) is now configured through the language server
  • there is a stable language server supporting terraform 0.12, however when trying to enable the language server, 2.0.1 requires a .terraform file in the root of you VScode folder that you have opened (annoying for users that open a larger project where tf is a sub folder)
  • some people have circumvented the above issue by adding a dummy .terraform file in their root that they work in, but frankly this seems like a hack - and ostensibly would require adding .terraform files to any parent folder that opens to be "root" when opening it in VScode
  • personally I downloaded the vsix for 1.4.0 and will be using that (despite the lack of 0.12 language support) until all these issue get fixed up

Going to merge this with hashicorp/terraform-ls#32. Additional folder configurations are now supported, and we will be allowing users to easily configure/list their root module directories in #423

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 context necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tillig picture tillig  ยท  4Comments

bnm22 picture bnm22  ยท  6Comments

jacobisaliveandwell picture jacobisaliveandwell  ยท  3Comments

NeckBeardPrince picture NeckBeardPrince  ยท  4Comments

sugarraysam picture sugarraysam  ยท  4Comments