mirror of
https://github.com/Ascyii/typstar.git
synced 2026-01-01 13:34:24 -05:00
feat(snip): expand into next line with correct indent (#13)
* New snippet type. Expand from nonempty line into next line. * Fix trigger to ' dm' instead of 'dm' * style: format code * minor: improve regex --------- Co-authored-by: arne314 <73391160+arne314@users.noreply.github.com>
This commit is contained in:
@@ -43,6 +43,12 @@ end
|
||||
|
||||
return {
|
||||
start('dm', '$\n<>\t<>\n<>$', { cap(1), visual(1), cap(1) }, markup),
|
||||
helper.start_snip_in_newl(
|
||||
'dm',
|
||||
'$\n<>\t<>\n<>$',
|
||||
{ helper.leading_white_spaces(1), visual(1), helper.leading_white_spaces(1) },
|
||||
markup
|
||||
),
|
||||
start('fla', '#flashcard(0)[<>][\n<>\t<>\n<>]', { i(1, 'flashcard'), cap(1), visual(2), cap(1) }, markup),
|
||||
start('flA', '#flashcard(0, "<>")[\n<>\t<>\n<>]', { i(1, 'flashcard'), cap(1), visual(2), cap(1) }, markup),
|
||||
snip('IMP', '$==>>$ ', {}, markup),
|
||||
|
||||
Reference in New Issue
Block a user