Open ludovicschwartz opened 1 year ago
Upon further investigation, the error seems to be coming from this piece of code in snippet_manager.py
:
has_storage_dir = (
vim_helper.eval(
"exists('g:UltiSnipsSnippetStorageDirectoryForUltiSnipsEdit')"
)
== "1"
)
Indeed, doing a :echo exists('g:UltiSnipsSnippetStorageDirectoryForUltiSnipsEdit')
returns 0.
Adding this line to the vim/nvim fixed the issue :
let g:UltiSnipsSnippetStorageDirectoryForUltiSnipsEdit=$HOME.'/.config/nvim/UltiSnips'
That being said, the behaviour changed when creating the symlink, and I still don't understand why it stopped working. I'll dig deeper.
When the .snippets filed are stored in a symlinked folder, calling
:UltiSnipsEdit
returns the following error : UltiSnips was not able to find a default directory for snippets. Do any of ['/home/user/.config/nvim', '/home/user/.vim'] exist AND contain any of the folders in g:UltiSnipsSnippetDirectories ? With default vim settings that would be: ~/.vim/UltiSnips Try :UltiSnipsEdit! instead of :UltiSnipsEdit. The snippets themselves work just fine.Expected behavior: The symlinked file
all.snippets
(or the file corresponding to the type of document being edited) is opened by neovimActual behavior: An error message appears
Steps to reproduce
ln -s /PathToConfig/UltiSnips ~/.config/nvim/UltiSnips
:UltiSnipsEdit
command.config/nvim/init.vim
: