Skip to content

SnippetString doesn't have builder-method for Choice #43643

@DanTup

Description

@DanTup

In the snippet docs there's syntax for adding choices for placeholders:

Choice

Placeholders can have choices as values. The syntax is a comma separated enumeration of values, enclosed with the pipe-character, for example ${1|one,two,three|}. When the snippet is inserted and the placeholder selected, choices will prompt the user to pick one of the values.

Currently the SnippetString class has methods for appendPlaceholder, appendVariable, etc. but there isn't an option for choices. We can build these manually, but it'd be better if we could stick to a nice API.

Metadata

Metadata

Assignees

Labels

apiapi-finalizationfeature-requestRequest for new features or functionalitygood first issueIssues identified as good for first-time contributorshelp wantedIssues identified as good community contribution opportunitieson-release-notesIssue/pull request mentioned in release notessnippetsverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions