neoclide / coc-snippets

Snippets solution for coc.nvim
970 stars 41 forks source link

Ultisnips - Variables into conditional replacements are not replaced #350

Open z0rzi opened 8 months ago

z0rzi commented 8 months ago

For example:

SnakeCase: ${1:SomeVariable}
camel_case:  ${1/^(.[a-z]*)([A-Z][a-z]*)$/\l$1(?2:-\l$2)/g}

Will give:

SnakeCase: SomeVariable
camel_case:  some-$2

The $2 is not replaced by variable.