LuaSnip
LuaSnip copied to clipboard
[feature request] parse simple condition flags in snipmate
I use luasnip as my snip egine and vim-snippets as main snippet source.
I notice that some of the snippets in vim-snippets has a suffix flag such as:
snippet sk "skip unittests" b
@unittest.skip(${1:skip_reason})
snippet allow "allow lint attribute" b
#[allow(${1:unused_variables})]
and similar ultisnips samples:
snippet prop "Proposition" bi
\begin{prop}[$1]
${0:${VISUAL}}
\end{prop}
endsnippet
snippet xx "cross" Aw
\times
endsnippet
current version of luasnip doesn't process the flags b, w, A, i etc, which means some basic conditions, if it is possible to parse such flags in snipmate loader?
Hi :)
This seems very reasonable, I'll look into adding those we support. Thanks for mentioning that vim-snippets contains these, I was not aware :)
I took a quick look at vim-snippets, it seems like snippets with these suffixes always have the description in quotes, is that consistent?
(otherwise, we may mistake some last word of the description for the suffix-string, for example Ai (there are not many words that can be made from these flag-chars, but still :D ))
I took a quick look at vim-snippets, it seems like snippets with these suffixes always have the description in quotes, is that consistent?
I think so, since the suffix flag is optional, the standard format needs quotes to distinguish description and suffix flag