Closed doubleChu closed 2 years ago
Those are all very good suggestions, thank you! Finally there is some engagement with this plugin :D
seems to repeat !v twice, is that a syntax error ?
Yes it is, good catch!
is it unnecessary to make such a conversion ?
Absolutely, I haven't thought about this edge case, there is no need for an extra conversion step to Vimscript.
It may take a week or so until I have some time to work on this though, I'll let you know!
In #6 I have done a conversion from vscode_luasnip to vscode_luasnip to replace some snippets. Date snippets like
"${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}"
is converted to Vimscript like"`!v !v strftime('%Y')`-`!v strftime('%m')`-`!v strftime('%b')`"
When I tried to expand 'date', this would be plain text as same as the code above. L3MON4D3/LuaSnip#283 shows that LuaSnip does not support this until L3MON4D3/LuaSnip#445 is merged. I checked the source code and here is my advice:[Variable.CURRENT_YEAR] = [[`!v !v strftime('%Y')`]]
seems to repeat !v twice, is that a syntax error ?Moreover, have you ever considered to add an option to not automatically generate the required package.json file in the root directory ? Cuz if what I want to do is replace the snippets rather than generate the text for a different engine, I can choose to disable it.