SnippetSyntaxError: Invalid line 'priority -50'
dvzrv opened this issue · 6 comments
dvzrv commented
When building 2.1 and generating the ultisnips snippet I get the following in vim:
An error occured. This is either a bug in UltiSnips or a bug in a
snippet definition. If you think this is a bug, please report it to
https://github.com/SirVer/ultisnips/issues/new
Please read and follow:
https://github.com/SirVer/ultisnips/blob/master/CONTRIBUTING.md#reproducing-bugs
Following is the full stack trace:
Traceback (most recent call last):
File "/usr/share/vim/vimfiles/pythonx/UltiSnips/err_to_scratch_buffer.py", line 18, in wrapper
return func(self, *args, **kwds)
File "/usr/share/vim/vimfiles/pythonx/UltiSnips/snippet_manager.py", line 905, in _track_change
self._try_expand(autotrigger_only=True)
File "/usr/share/vim/vimfiles/pythonx/UltiSnips/snippet_manager.py", line 749, in _try_expand
snippets = self._snips(before, False, autotrigger_only)
File "/usr/share/vim/vimfiles/pythonx/UltiSnips/snippet_manager.py", line 629, in _snips
source.ensure(filetypes)
File "/usr/share/vim/vimfiles/pythonx/UltiSnips/snippet/source/file/base.py", line 31, in ensure
self._load_snippets_for(ft)
File "/usr/share/vim/vimfiles/pythonx/UltiSnips/snippet/source/file/base.py", line 53, in _load_snippets_for
self._parse_snippets(ft, fn)
File "/usr/share/vim/vimfiles/pythonx/UltiSnips/snippet/source/file/base.py", line 69, in _parse_snippets
raise SnippetSyntaxError(filename, line_index, msg)
UltiSnips.snippet.source.file.base.SnippetSyntaxError: Invalid line 'priority -50' in /usr/share/vim/vimfiles/snippets/ansible.snippets:1
Dependencies
- ansible 2.9.6
- vim-ultisnips 3.2
- vim 8.2.0343
pearofducks commented
This happens upon generation of snippets? Or attempting to use the snippets after generation?
Either way, I can't reproduce this.
dvzrv commented
This happens after installation, as soon as I open an ansible yaml file, go to insert mode and press enter.
pearofducks commented
Yeah I can't reproduce this from HEAD using vim-plug on Mac or Debian.
dvzrv commented
Is vim-ultisnips running with python3 or python2 and which version of ultisnips is it?
pearofducks commented
I don't know what ultisnips uses as a default, but I'd guess python2.
I'm using vim-plug, which will just grab HEAD from the GitHub repo
dvzrv commented
Closing because void: #98 (comment)