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

No code suggestions/completion and linting at 2.0.1 #383

Closed
ghost opened this issue Jun 12, 2020 · 14 comments
Closed

No code suggestions/completion and linting at 2.0.1 #383

ghost opened this issue Jun 12, 2020 · 14 comments

Comments

@ghost
Copy link

ghost commented Jun 12, 2020

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 (hashicorp/terraform-ls#15).

I dont know what i can do else.

@giorgio-devops
Copy link

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.

@chrisgallivan
Copy link

how do you trigger the auto-completion popup?

@stefanhenseler
Copy link

stefanhenseler commented Jun 12, 2020

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

@paultyng
Copy link
Contributor

paultyng commented Jun 12, 2020

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 hashicorp/terraform-ls#32 (comment).

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).

@ghost
Copy link
Author

ghost commented Jun 12, 2020

@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?

@giorgio-devops
Copy link

how do you trigger the auto-completion popup?

I've set ctrl+space shortcut

@darrenfurr
Copy link

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

@awshumway
Copy link

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

@FernandoMiguel
Copy link

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

@njsee
Copy link

njsee commented Aug 15, 2020

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.

@jflitton
Copy link

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

@googlicius
Copy link

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

@radeksimko
Copy link
Member

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: #569

Thank you for understanding and patience.

@ghost
Copy link

ghost commented Mar 27, 2021

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.

@ghost ghost locked as resolved and limited conversation to collaborators Mar 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests