Closed
Description
The following code:
const a = new vs.SnippetString();
a.appendChoice(["test", "test2"], 0);
await editor.insertSnippet(a, new vs.Range(new vs.Position(0, 0), new vs.Position(0, 0)));
Inserts raw snippet markup into the document:
It's not very explicit in the docs/tooltips but I guess that the "final tabstop" does not support choices. If this is the case, it would be better if appendChoice
throws if given an invalid value, or VS Code just does some default behaviour (like setting the tabstop, inserting the first choice, etc.) rather than inserting snippet markup into the document.