You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using luasnip with nvim-autopairs and I would like to be able to expand (*) to \left ( * \right ) where the * represents where my cursor position is when I want to expand the snippet.
Is this possible in luasnip? I thought about using the snip_expand command but wasn't quite sure how it was meant to be used.
The text was updated successfully, but these errors were encountered:
Yeah, should be possible: check out condition and show_condition, you'd have to manually get the line the cursor is on (:h nvim_win_get_cursor, :h nvim_buf_get_lines), but should be pretty straightforward :)
@L3MON4D3 hmm. I am not quite sure what you have in mind. From the docs, i can't seem to piece together a solution; I am not sure how to use the conditions as there only appears to be begin and end line conditions and selected text conditions.
Oh, you can get the full line by querying the current position of the cursor and then getting the line, for which you can use the two api functions I linked above
I am using
luasnip
withnvim-autopairs
and I would like to be able to expand(*)
to\left ( * \right )
where the*
represents where my cursor position is when I want to expand the snippet.Is this possible in
luasnip
? I thought about using thesnip_expand
command but wasn't quite sure how it was meant to be used.The text was updated successfully, but these errors were encountered: