Skip to content

Add missing import and extension top-level completions in .bicepparam files#19448

Open
Copilot wants to merge 3 commits intomainfrom
copilot/fix-no-import-completion
Open

Add missing import and extension top-level completions in .bicepparam files#19448
Copilot wants to merge 3 commits intomainfrom
copilot/fix-no-import-completion

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 15, 2026

Top-level completions in .bicepparam files were missing import and extension, even though both are valid in param files. This made keyword suggestions inconsistent with supported syntax.

  • Completion provider update

    • Added import and extension to top-level keyword completions for BicepSourceFileKind.ParamsFile in BicepCompletionProvider.
    • Kept existing using singleton behavior unchanged (still only offered when absent).
  • Params completion expectations

    • Updated ParamsCompletionTests keyword assertions to include:
      • extends
      • extension
      • import
      • param
      • (using where applicable)
  • Resulting behavior

    • .bicepparam top-level completion now surfaces extension and import alongside existing declaration keywords.
case BicepSourceFileKind.ParamsFile:
    if (model.Root.UsingDeclarationSyntax is null)
    {
        yield return CreateKeywordCompletion(LanguageConstants.UsingKeyword, "Using keyword", context.ReplacementRange);
    }

    yield return CreateKeywordCompletion(LanguageConstants.ExtensionKeyword, "Extension keyword", context.ReplacementRange);
    yield return CreateKeywordCompletion(LanguageConstants.ImportKeyword, "Import keyword", context.ReplacementRange);
    yield return CreateKeywordCompletion(LanguageConstants.ParameterKeyword, "Parameter assignment keyword", context.ReplacementRange);
    yield return CreateKeywordCompletion(LanguageConstants.ExtendsKeyword, "Extends keyword", context.ReplacementRange);
    break;

[!WARNING]

Agent-Logs-Url: https://github.com/Azure/bicep/sessions/724afe27-d12d-41af-b92c-d11ac3811d4d

Co-authored-by: anthony-c-martin <38542602+anthony-c-martin@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix missing import completion in .bicepparam files Add missing import top-level completion in .bicepparam files Apr 15, 2026
Copilot AI requested a review from anthony-c-martin April 15, 2026 18:22
@anthony-c-martin anthony-c-martin marked this pull request as ready for review April 15, 2026 19:12
@github-actions
Copy link
Copy Markdown
Contributor

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

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

@levimatheri
Copy link
Copy Markdown
Contributor

Can we also add extension keyword to the list?

@anthony-c-martin
Copy link
Copy Markdown
Member

Can we also add extension keyword to the list?

@copilot please address

Agent-Logs-Url: https://github.com/Azure/bicep/sessions/11907c06-fcc0-4ae0-a04c-cd775639f931

Co-authored-by: anthony-c-martin <38542602+anthony-c-martin@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 16, 2026

Can we also add extension keyword to the list?

Implemented in commit 5be8ee9: .bicepparam top-level completions now include the extension keyword, and integration tests were updated accordingly.

Screenshot:
UI completion screenshot

Can we also add extension keyword to the list?

@copilot please address

Addressed in commit 5be8ee9: added extension to params-file top-level keyword completions and updated the corresponding completion tests.

Screenshot:
UI completion screenshot

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • aka.ms
    • Triggering command: /home/REDACTED/work/bicep/bicep/src/Bicep.LangServer.IntegrationTests/bin/Debug/net10.0/Bicep.LangServer.IntegrationTests /home/REDACTED/work/bicep/bicep/src/Bicep.LangServer.IntegrationTests/bin/Debug/net10.0/Bicep.LangServer.IntegrationTests --internal-msbuild-node /tmp/19db68f1136a4f2c9c1d4442a2d3de6f/.p --ignore-exit-code 8 (dns block)
    • Triggering command: /usr/bin/dotnet dotnet /home/REDACTED/work/bicep/bicep/src/Bicep.LangServer.IntegrationTests/bin/Debug/net10.0/Bicep.LangServer.dll (dns block)
    • Triggering command: /usr/bin/dotnet dotnet /home/REDACTED/work/bicep/bicep/src/Bicep.LangServer.IntegrationTests/bin/Debug/net10.0/Bicep.LangServer.dll --pipe 37e44fbc-7b59-43ea-8d95-841aee1258e5 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title Add missing import top-level completion in .bicepparam files Add missing import and extension top-level completions in .bicepparam files Apr 16, 2026
Copilot AI requested a review from anthony-c-martin April 16, 2026 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No import completion in .bicepparam

3 participants