Closed sigzero closed 5 months ago
This is already implemented in the completion
branch. There are just a couple bugs that need working out before it's merged to master.
@ajzafar Any update for this "selection list in tab-stop"?
I have rebased the completion
branch on top of the current master
branch (after
fixing a very few trivial conflict issues due to the rebase), and from what I can see,
the selection is working as expected, for example with this snippet:
snippet applied
Applied to ${1|master|next|backports}, thanks.
which gives the behaviour I would expect and like to have:
applied<TAB>
Applied to master, thanks
|>master <|
| next |
| backports |
(For readability, I replaced colours with bars for the menu, and with ><
for the selection).
Is there something else I can help with, to get this merged?
Thanks!
@yann-morin-1998 I fixed a few bugs over the weekend. There are a few left, but they're going to take a bit more effort to fix, and they only show up when you try to use a mirror or an evaluation inside a selection option. (Well one is actually a problem independent of selections, when using a mirror of a placeholder with a nested placeholder.) They may somewhat work, but I've decided to merge the branch with the caveat that those combinations are not currently supported.
I'm going to go ahead and close this as the major feature is implemented, and I'm going to open new issues for the remaining bugs.
@ajzafar That's wonderful, thanks a lot! 👍
It would be nice to be to able to present multiple items to select from when the snippet section is called.
For example, for a shell script, I would define a TODO list like:
I've taken the construct from how vscode does it. So using the pipe character to enclose a comma delineated list gives a popup list to make a selection from.