Azure / Azure/bicep

Additional improvement ideas for resource and snippet completions

Open
#13,729 0 comments 0 reactions 0 assignees View on GitHub
devdiv enhancement Needs: Upvote story: snippets and scaffolding
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

1) Automatically suggest resource types based on the resource name. E.g.:

resource stg '

=> suggest Microsoft.Storage types at the top of the completion list

NOTE: Copilot already does this, although it hasn't been very good at syntax in the past. But it only provides one suggestion, might still be worthwhile
image

2) You shouldn't have to choose first whether you want a resource from a snippet or a resource without a snippet, but that's currently forced by the fact that you get snippet completions before adding a name and resource type suggestions after adding a name.

Possible ways of fixing this (note: for a and b we'll need an intelligent way of sorting the snippets/resource types together):

a) Include snippets in completions for resource types

image

This could include snippet completions as well as resource types. Note that since a name is already added, we would need to modify the resource name in the snippet to match the name the user already specified. We might also need to restrict it to snippets with a single resource.

image

b) Include resource type completions in the snippet completions list. In this case we can make automatically turn the resource type into a snippet and have the name be a snippet field to be filled in the user.

c) include snippets in the list of completions after typing the "="

image

Again in this case we'd need to modify the snippet to keep the existing name and resource type/api version (and possibly worry about whether the given api version is compatible with the snippet - once smalll chance it isn't though) and maybe limit to single-resource snippets.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are identified. Start by mapping the resource and snippet completion paths described in the issue, then decide which proposal to implement and define completion ordering, name/type preservation, and single-resource snippet behavior as done criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
developer-experience
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.