Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict with UltiSnips #1

Open
sassanh opened this issue Nov 8, 2016 · 5 comments · May be fixed by #2
Open

Conflict with UltiSnips #1

sassanh opened this issue Nov 8, 2016 · 5 comments · May be fixed by #2

Comments

@sassanh
Copy link

sassanh commented Nov 8, 2016

I'm using UltiSnips and I get this error when I open a .gitignore file:

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.

Following is the full stack trace:
Traceback (most recent call last):
  File "/Users/sassanharadji/.config/nvim/plugged/ultisnips/pythonx/UltiSnips/err_to_scratch_buffer.py", line 16, in wrapper
    return func(self, *args, **kwds)
  File "/Users/sassanharadji/.config/nvim/plugged/ultisnips/pythonx/UltiSnips/snippet_manager.py", line 151, in snippets_in_current_scope
    snippets = self._snips(before, True)
File "/Users/sassanharadji/.config/nvim/plugged/ultisnips/pythonx/UltiSnips/snippet_manager.py", line 575, in _snips
    source.ensure(filetypes, cached=autotrigger_only)
  File "/Users/sassanharadji/.config/nvim/plugged/ultisnips/pythonx/UltiSnips/snippet/source/file/_base.py", line 47, in ensure
    self._load_snippets_for(ft)
  File "/Users/sassanharadji/.config/nvim/plugged/ultisnips/pythonx/UltiSnips/snippet/source/file/_base.py", line 80, in _load_snippets_for
    self._parse_snippets(ft, fn)
  File "/Users/sassanharadji/.config/nvim/plugged/ultisnips/pythonx/UltiSnips/snippet/source/file/_base.py", line 99, in _parse_snippets
    raise SnippetSyntaxError(filename, line_index, msg)
SnippetSyntaxError: Invalid line '        *.i' in ~/.config/nvim/plugged/vim-gitignore/snippets/gitignore/CUDA.snippets:3
@sergei-dyshel
Copy link

Looks like Ultisnips is loading snippets from snippets directory which is intended only for Snipmate as there is separate Ultisnips directory. If you don't have other plugins which provides snippets in snippets directory that you need, you may add this to .vimrc and it will solve this problem:

let g:UltiSnipsSnipMateDirectories = ["Ultisnips"]

@sassanh
Copy link
Author

sassanh commented Sep 5, 2017

Looking at docs I guess you mean g:UltiSnipsSnippetDirectories I set it and unfortunately it's not working for me. Did you try it yourself?

@sergei-dyshel
Copy link

You're right, it doesn't help. But this does:

let g:UltiSnipsEnableSnipMate = 0

@sassanh
Copy link
Author

sassanh commented Sep 5, 2017

Thanks but unfortunately I have plugins that proved snippets and I need those snippets, it may help others though.

piouPiouM added a commit to piouPiouM/dotfiles that referenced this issue Feb 26, 2018
piouPiouM added a commit to piouPiouM/dotfiles that referenced this issue Jan 7, 2019
anachronic added a commit to anachronic/dotfiles that referenced this issue Apr 18, 2020
Reason is that the former messes UltiSnips up and I just wanted the
syntax.

See gisphm/vim-gitignore#1
@wcn3
Copy link

wcn3 commented Jun 5, 2020

I solved this by creating .vim/ftplugin/gitignore.vim

with the contents

let g:UltiSnipsEnableSnipMate=0

and that seems to work well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants