YouCompleteMe icon indicating copy to clipboard operation
YouCompleteMe copied to clipboard

UltiSnips custom dir

Open kismet010 opened this issue 12 years ago • 6 comments

Using custom directory for UltiSnips like this:

let g:UltiSnipsSnippetsDir = '~/.foo/snips/'
let g:UltiSnipsSnippetDirectories = ['UltiSnips', 'snips']

YouCompleteMe can't recognize those snippets

kismet010 avatar Feb 14 '14 18:02 kismet010

Hm, I'm not sure that's the case. Have you updated to latest UltiSnips? There was a breaking change recently that was fixed.

Other than that, I don't know how to help here. @SirVer would know more.

Valloric avatar Feb 18 '14 19:02 Valloric

No I haven't, it's a clean install

kismet010 avatar Feb 18 '14 19:02 kismet010

UltiSnips does not yet support snipMate snippets - there is an unofficial fork here https://github.com/marcweber/ultisnips that supports this, but it is quite buggy in other ways. I have an actionplan for supporting snipMate snippets, but I am pretty swamped too, so who knows when I'll have it done :).

SirVer avatar Feb 18 '14 19:02 SirVer

@SirVer It is not about snipMate, I just moved directory created with :UltiSnipEdit (~.vim/bundle/UltiSnips/UltiSnips) to a new one (~/.dot/snips)

And I will take this opportunity to thank you both for your work :)

kismet010 avatar Feb 18 '14 19:02 kismet010

And I will take this opportunity to thank you both for your work :)

Thank you, this is always appreciated. :)

let g:UltiSnipsSnippetsDir = '~/.foo/snips/'

This does nothing by the way, it is not used by UltiSnips.

I cannot reproduce the issue - when I set let g:UltiSnipsSnippetDirectories = ["UltiSnips", "snips"], snippets from ~/.vim/snips/all.snippets are picked up and displayed by ycm just like I would expect. Two ideas: could it be that you are overwriting all your snippets? (using ! as option). If not, you could you make your ~/.vim available somewhere so that I can investigate?

SirVer avatar Feb 18 '14 21:02 SirVer

Has this issue been resolved? I'm facing the same problem. @SirVer @Valloric @vheon

I found out that this happens when i have multiple custom snippet files for the same filetype, i.e. "my_snippets/tex_temp1.snippets", "my_snippets/tex.snippets" etc. When this happens, neither the default nor the custom snippets appear in the auto-complete pop-up.

Additionally, this effects only the specific filetypes, while for example cpp pop-ups work fine.

athallas avatar Dec 22 '14 13:12 athallas