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

textDocument/complete: Provide completion in incomplete blocks #57

Open
radeksimko opened this issue Apr 21, 2020 · 2 comments
Open

textDocument/complete: Provide completion in incomplete blocks #57

radeksimko opened this issue Apr 21, 2020 · 2 comments

Comments

@radeksimko
Copy link
Member

Server Version

v0.1.0

Terraform Version

v0.12.24

Terraform Configuration Files

provider "aws" {
}
resource "aws_vpc" "name" {
}
data ""

Log Output

2020/04/21 11:11:11 rpc_logger.go:45: Error for "textDocument/completion" (ID 6): [-32098] finding HCL block failed: no block found at hcl.Pos{Line:5, Column:7, Byte:55}

Expected Behavior

A list of all AWS data sources offered as completion candidates.

(assuming that completion of data source names per #19 is implemented)

Actual Behavior

No completion available.

Steps to Reproduce

  1. Open a folder with the above config
  2. Open file with the above config from that folder
  3. Trigger autocompletion on line 5, column 7 (1-indexed) - i.e. data "<HERE>"

Proposal

hashicorp/hcl#365 is key to make this work - in theory when it's addressed and we upgrade to the HCL version with that patch it should be just resolved.

radeksimko added a commit that referenced this issue Apr 21, 2020
This doesn't actually enable completion for invalid configs yet
but it paves the way for #56 and #57
radeksimko added a commit that referenced this issue Apr 21, 2020
This doesn't actually enable completion for invalid configs yet
but it paves the way for #56 and #57
@paultyng paultyng added this to the v0.3.0 milestone May 7, 2020
@radeksimko
Copy link
Member Author

This is temporarily being de-prioritised in favour of #18 which is slightly easier and quicker to solve and can address at least cases where user uses completion to create the block.

@dme86
Copy link

dme86 commented Feb 5, 2024

Is this included in any roadmap, or is there a quick fix available?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants