hcl-lang
hcl-lang copied to clipboard
Schema and decoder to be used as building blocks for an HCL2-based language server.
## Context Reference completion often includes trailing dot, which is the step separator. The trailing dot is not included in the AST by HCL, which we already account for in...
## Context While implementing support for operators in https://github.com/hashicorp/hcl-lang/pull/320 a few edge cases concerning completion near an unterminated function call were discovered. - `attr = !lower(` - `attr = 42...
## Context While implementing support for operators in https://github.com/hashicorp/hcl-lang/pull/320 a few edge cases concerning completion near an unterminated binary operator were discovered. Examples: - `attr = 42 +` - `attr...
A follow up to [this issue on terraform-ls](https://github.com/hashicorp/terraform-ls/issues/1155), wanted to make this here per @radeksimko suggestion to discuss design of implementing supporting functionality to this repo to be used by...
## Context As part of https://github.com/hashicorp/hcl-lang/pull/232 in order to avoid duplicate completion we decided to introduce two "toggle" fields, such that we can nest and reuse `LiteralType` and `AnyExpression` constraints...
## Context As described in https://github.com/hashicorp/terraform-ls/issues/1291 we currently complete 1st-level blocks when a dot (`.`) is typed inside the block's body.  ## Proposal Be more defensive and prevent any...
## Context Currently, we operate with just `cty.Type`s in `LiteralType`, which limits us during completion, hover or go-to-definition in certain contexts. ## Use Cases Here we could provide **names of...
## Context Currently we provide relatively inconsistent hover data for various complex types: i.e. we render nested `object`s with the appropriate nesting, markdown syntax etc. but we leave all other...
## Context Currently we collect constraints closest to the reference. For example, given attribute schema ```go { "foo": &schema.AttributeSchema{ Constraint: schema.LiteralType{Type: cty.List(cty.String)}, IsOptional: true, } } ``` and relevant config...
## Context While the HCL/Terraform language encourages use of ["valid identifiers"](https://github.com/hashicorp/hcl/blob/main/hclsyntax/spec.md#identifiers), such as `a1234`, it still supports identifiers which do not comply with the same restrictions, such as `12345`. These...