Vscode-terraform: No code suggestions/completion and linting at 2.0.1

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

Good morning,

iam using vscode-terraform inside the wsl.

vs code: 1.46.0
vscode-terraform: 2.0.1
terraform-ls: 0.3.2

After upgrading (also after a freshinstall) the vscode-terraform does nothing else then syntax highlighting.

  • linting does not run
  • no code suggestions for completion (like defined locals or other vars except from the file where iam)

I did not see any errors on startup. The output from terraform-ls is running and does not shown any errors except the missing workspace/didChangeWatchedFiles function which is mentioned as a issue at the terraform-ls project (https://github.com/hashicorp/terraform-ls/issues/15).

I dont know what i can do else.

All 14 comments

I have this error every time I try to trigger the autocompletion pop-up

Position:lsp.Position{Line:6, Character:14}}
2020/06/12 10:33:35 parser.go:191: Parsed block type: "resource"
2020/06/12 10:33:35 schema_storage.go:145: Acquiring semaphore before reading schema
2020/06/12 10:33:35 rpc_logger.go:45: Error for "textDocument/completion" (ID 24): [-32098] finding completion items failed: no schema available
2020/06/12 10:33:35 server.go:204: Completed 1 requests [555.312ยตs elapsed]
[Error - 10:33:35 AM] Request textDocument/completion failed.
  Message: finding completion items failed: no schema available
  Code: -32098 

This error comes trying to autocomplete any aws resource.

how do you trigger the auto-completion popup?

Hi I have the same issue, same versions installed. Just no code suggestions. Syntax highlighting works fine.

Currently the extension requires the workspace to be initialized (terraform init), but we are working to make the UX on that cleaner (better messaging, prompting to init, etc, we are consolidating these efforts under #329). There are also limitations on folder/module structure, that is being worked on in https://github.com/hashicorp/terraform-ls/issues/32#issuecomment-639543256.

Depending on your settings in VS Code, completion will start automatically (if not inside quotes/string literal, on certain trigger characters), or you can explicit trigger it a keyboard combination (Ctrl+Space on Windows, for example).

@paultyng

I miss the code suggestions in the root module also. Terraform init does not change that. Locals and vars are not solved after writing a dot (local. , var.). Variables from submodels also. The code editor does only make suggestions on variables which are alredy used within the same .tf file.

I did not read any clear message that somebody work on the code suggestion problem. Did i miss something?

how do you trigger the auto-completion popup?

I've set ctrl+space shortcut

I ran into the same problem & reverted to 1.4.0 of the extension:
https://github.com/hashicorp/vscode-terraform/issues/386#issuecomment-644187733

I ran into the same problem & reverted to 1.4.0 of the extension:
#386 (comment)

After reverting to the old version, I'm back to the old issue of Terraform 0.12+ being unsupported.
Issue #195

I ran into the same problem & reverted to 1.4.0 of the extension:
#386 (comment)

After reverting to the old version, I'm back to the old issue of Terraform 0.12+ being unsupported.
Issue #195

@awshumway you need to install the language server.
do cmd+p and search for install language server

I'm having the same issues on Windows 10 2004
vscode: 1.48.0
terraform-ls .60
vscode-terraform 2.1.1
I can only get autocompletion by pressing CTRL+Space.
This is on a clean install of win10.

Same problem (no suggestions, no linting):
vscode: 1.48.0
terraform-ls: 0.6.1
vscode-terraform: 2.2.0

I got same problem, now I uninstalled it and install Terraform (forked) instead.

Hi folks,
the issue is not addressed _yet_, but we have a plan for addressing it and I'm just converging all the issues with the same root cause, such as this one, into a single issue: https://github.com/hashicorp/vscode-terraform/issues/569

Thank you for understanding and patience.

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

NeckBeardPrince picture NeckBeardPrince  ยท  4Comments

okgolove picture okgolove  ยท  4Comments

vfab picture vfab  ยท  4Comments

avinashkavi447 picture avinashkavi447  ยท  7Comments

bnm22 picture bnm22  ยท  6Comments