Skip to content

Conversation

@polatengin
Copy link
Member

@polatengin polatengin commented Feb 2, 2026

Fixes #17610

Design Proposal

When using the resourceInput<> type accessor with chained property access involving arrays, intellisense does not offer * (splat) completion inside square brackets. For example:

param foo resourceInput<'Microsoft.App/containerApps@2024-03-01'>.properties.template.containers[|]

At te cursor position |, no completion is offered for * to access the array item type.

When parsing foo.items[] in a type context, the Bicep parser creates an ArrayTypeSyntax node (interpreting [] as "array of foo.items"), not a TypeArrayAccessSyntax node. The existing completion logic only detected TypeArrayAccessSyntax, which is created when there's already content inside the brackets (like foo[0]).

In this PR we extend the completian context detection to also recognize ArrayTypeSyntax as a valid context for offering the * completion when the cursor is positioned between [ and ].

I added some integration tests to cover;

  • Basic array splat completion in type clauses
  • Chained typ completions for *.properties.tags.* and *.properties.template.containers[*].probes patterns
  • Real resource types, such as; Microsoft.App/containerApps and Microsoft.Resources/tags

Checklist

Microsoft Reviewers: Open in CodeFlow

@polatengin polatengin self-assigned this Feb 2, 2026
@polatengin polatengin added this to Bicep Feb 2, 2026
@polatengin polatengin linked an issue Feb 2, 2026 that may be closed by this pull request
@github-project-automation github-project-automation bot moved this to Todo in Bicep Feb 2, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

Test this change out locally with the following install scripts (Action run 21601528735)

VSCode
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-vsix.sh) --run-id 21601528735
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-vsix.ps1) } -RunId 21601528735"
Azure CLI
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-cli.sh) --run-id 21601528735
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-cli.ps1) } -RunId 21601528735"

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

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Completion not offered for array splat in type syntax

2 participants