SirVer / ultisnips

UltiSnips - The ultimate snippet solution for Vim. Send pull requests to SirVer/ultisnips!
GNU General Public License v3.0
7.54k stars 691 forks source link

NeoVim + vim-plug custom snippets issue. #619

Closed sittim closed 8 years ago

sittim commented 8 years ago

I am using NeoVim with vim-plug. I have the following lines in the ~/.nvimrc file:

Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'

UltiSnips work great for the snippets in the vim-snippts directory, but executing :UltiSnipsEdit and adding a snippet produces no result. vim-plug places the UltiSnips plugin into

~/.config/nvim/plugged/ultisnips

and the custom snippet files into:

~/.config/nvim/UltiSnips

so if I edited a c++ file and typed executed UltiSnipsEdit, and added a snipped, it shows up as ~/.config/nvim/UltiSnips/cpp.snippet

But if I take this file and copy it from ~/.config/nvim/UltiSnips/cpp.snippet to ~/.nvim/UltiSnips/cpp.snippet` then the custom snippet works.

Would you have a recommendation on how to have the UltiSnipsEdit command and have the nvim use the same directory for custom snippet file?

sittim commented 8 years ago

By the way, you can view all of mine configurations here:

https://github.com/sittim/configs

seletskiy commented 8 years ago

@sittim: Try to experiment with value of g:UltiSnipsSnippetsDir.

sittim commented 8 years ago

This solution works OK, The following entry:

let g:UltiSnipsSnippetsDir="~/.nvim/UltiSnips"

uses and edits (via UltiSnipsEdit command) the snippets in the ~/.nvim/UltiSnips directory. This is OK, I can now comfortably work with snippets, ideally, it would be nice to keep everything in the same place, that is in the nvim confiration directory, which is at~/.config/nvim/UltiSnips, but the following entry produces no result: let g:UltiSnipsSnippetsDir="~/.config/nvim/UltiSnips"

ultrox commented 8 years ago

I had the same problem on nvim 0.2.0-28 mac os ElCapitan and iconically,

`let g:UltiSnipsSnippetsDir="~/.config/nvim/UltiSnips"

Works for me.