Completions not working in an un-terminated object
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 81
Description
Created from this sample: https://github.com/Azure/bicep/pull/3510#issuecomment-878601832
In the following example, we have an unmatched set of closing `}` braces, which causes a syntax error. Because this causes a syntax error, Bicep is unable to correctly offer property completions (cursor represented by `|`), and syntax highlighting also shows up incorrectly:
```bicep
resource test 'Microsoft.Authorization/policyAssignments@2018-05-01' = {
name: 'asdfsd'
properties: {
policyDefinitionId: policy.|
}
```
Tested with Bicep v0.4.63
Contributor guide
Research direction
Reproduce the issue with the Bicep snippet in the report, including the unmatched closing brace and the completion cursor after `policy.`. Start by tracing how syntax errors affect property completions and syntax highlighting. Done means the example offers the expected property completions and displays syntax highlighting correctly despite the incomplete object.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100