mirror of
https://github.com/neovim/neovim.git
synced 2026-07-14 05:10:36 +00:00
feat(snippet): support multiple sessions #29340
This commit is contained in:
@@ -403,4 +403,18 @@ describe('vim.snippet', function()
|
||||
feed('foo')
|
||||
eq({ '口口function(foo)' }, buf_lines(0))
|
||||
end)
|
||||
|
||||
it('supports multiple snippet sessions', function()
|
||||
test_expand_success({ 'func $1($3) {', ' $2', '}' }, { 'func () {', ' ', '}' })
|
||||
|
||||
feed('foo<Tab>')
|
||||
|
||||
test_expand_success({ 'var x = $1 + $2' }, { 'func foo() {', ' var x = + ', '}' })
|
||||
|
||||
feed('a<Tab>b')
|
||||
|
||||
feed('<Tab><Tab>a, b')
|
||||
|
||||
eq({ 'func foo(a, b) {', ' var x = a + b', '}' }, buf_lines(0))
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user