Use new path for neovims config directory.

This commit is contained in:
Holger Rapp 2015-11-07 13:34:46 +01:00
commit cba31b1912

View File

@ -748,15 +748,14 @@ class SnippetManager(object):
if _vim.eval("exists('g:UltiSnipsSnippetsDir')") == '1': if _vim.eval("exists('g:UltiSnipsSnippetsDir')") == '1':
snippet_dir = _vim.eval('g:UltiSnipsSnippetsDir') snippet_dir = _vim.eval('g:UltiSnipsSnippetsDir')
else: else:
home = _vim.eval('$HOME')
if platform.system() == 'Windows': if platform.system() == 'Windows':
snippet_dir = os.path.join(_vim.eval('$HOME'), snippet_dir = os.path.join(home, 'vimfiles', 'UltiSnips')
'vimfiles', 'UltiSnips')
elif _vim.eval("has('nvim')") == '1': elif _vim.eval("has('nvim')") == '1':
snippet_dir = os.path.join(_vim.eval('$HOME'), xdg_home_config = _vim.eval('$XDG_CONFIG_HOME') or os.path.join(home, ".config")
'.nvim', 'UltiSnips') snippet_dir = os.path.join(xdg_home_config, 'nvim', 'UltiSnips')
else: else:
snippet_dir = os.path.join(_vim.eval('$HOME'), snippet_dir = os.path.join(home, '.vim', 'UltiSnips')
'.vim', 'UltiSnips')
filetypes = [] filetypes = []
if requested_ft: if requested_ft: