Closed
Description
The presence of '$' in snippets seems to result in an error and does not expand:
Error executing vim.schedule lua callback: {"result": [false, null, 0], "text": "$('
')"}
stack traceback:
[C]: in function 'vsnip#to_string'
...\site\pack\packer\start\cmp-vsnip/lua/cmp_vsnip/init.lua:40: in function 'resolve'
...-data\site\pack\packer\start\nvim-cmp/lua/cmp/source.lua:348: in function 'resolve'
...m-data\site\pack\packer\start\nvim-cmp/lua/cmp/entry.lua:452: in function 'resolve'
...im-data\site\pack\packer\start\nvim-cmp/lua/cmp/view.lua:225: in function 'fn'
...\site\pack\packer\start\nvim-cmp/lua/cmp/utils/async.lua:41: in function <...\site\pack\packer\start\nvim-cmp/lua/cmp/utils/async.lua:39>
The snippet causing this error:
{
"JQuery div": {
"prefix": "jdiv",
"body": [
"$('<div />')"
]
}
}
Removing the '$' in the body array allows the snippet to expand without error. The snippet as is works in VSCode, so not sure if this is considered a bug or just a difference between VSCode snippets and this plugin. I suspect it is trying to expand the '$' and following characters as if it were a placeholder. Is there a way to escape the '$' in the meantime?
Metadata
Metadata
Assignees
Labels
No labels