Skip to content

Commit 6addab3

Browse files
jpograndbanck
andauthored
Enable dynamic label completions (#154)
* Support dynamic block label and dependent block completion This adds support for completing the label for a given dynamic block and for completing the content for dependent blocks. * Add test cases for dynamic blocks * Enable nesting of dynamic blocks * Enable hover for dynamic (and nested) * Refactor semantic tokens for dynamic blocks * Cleanup unused dynamic context * Move dynamic-related logic under mergeBlockBodySchemas Arguably the function now does more than merging, so it should probably be called something like "resolveBlockBodySchema", but I'm leaving that for another PR/iteration. Co-authored-by: Daniel Banck <[email protected]>
1 parent 5a10955 commit 6addab3

File tree

9 files changed

+1120
-220
lines changed

9 files changed

+1120
-220
lines changed

decoder/body_candidates.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ func (d *PathDecoder) bodySchemaCandidates(body *hclsyntax.Body, schema *schema.
3434
candidates.List = append(candidates.List, attributeSchemaToCandidate("for_each", forEachAttributeSchema(), editRng))
3535
}
3636
}
37-
38-
if schema.Extensions.DynamicBlocks {
39-
candidates.List = append(candidates.List, d.blockSchemaToCandidate("dynamic", dynamicBlockSchema(), editRng))
40-
}
4137
}
4238

4339
if len(schema.Attributes) > 0 {

0 commit comments

Comments
 (0)