scnvim
scnvim copied to clipboard
[BUG] Luasnip snippets don't escape special characters
Describe the bug
The auto generated LuaSnip format snippets do not escape special characters from default arguments containing things such as \ and " making them disappear, it seems, when you trigger the snippets.
example?
Here's an example for a class generated from the Fosc package. The fifth argument has a symbol, which has an unescaped \ which is misinterpreted in Lua. Perhaps all snippet strings should use [[ and ]] instead of double quotes to fix this?
s( {trig = "FoscStartTextSpan.new", name = "FoscStartTextSpan.new", dscr = "Snippet for FoscStartTextSpan.new, auto generated by SCNvim" }, {t("FoscStartTextSpan.new"),t("("),t("leftText:"),i(1, "nil"),t(", "), t("rightText:"),i(2, "nil"),t(", "), t("style:"),i(3, "nil"),t(", "), t("direction:"),i(4, "nil"),t(", "), t("command:"),i(5, "\startTextSpan"),t(", "), t("concatHspaceLeft:"),i(6, "0.5"),t(", "), t("concatHspaceRight:"),i(7, "0.5"),t(", "), t("leftBrokenText:"),i(8, "nil"),t(", "), t("rightPadding:"),i(9, "nil"),t(", "), t("tweaks:"),i(10, "nil"), t(")"),})