Closed harshad1 closed 4 years ago
This isn't a neosnippet bug. Neovim will only read environment variables from control panel -> environment variables. Setting XDG_CONFIG_HOME there and using
g:neosnippet#snippets_directory = $XDG_CONFIG_HOME . "/nvim/snippets"
as per https://vi.stackexchange.com/a/16072 fixes the issue.
Apologies for the noise.
Yes. This is Vim/neovim's feature.
I have
g:neosnippet#snippets_directory = "$XDG_CONFIG_HOME/nvim/snippets"
on linux I have
XDG_CONFIG_HOME = /home/<username>/.config
on windows I haveXDG_CONFIG_HOME = "C:/Users/<username>/.config
On linux this evaluates to the correct location. On windows, however, when I execute
:NeoSnippetEdit
neovim opensC:/path/to/current/directory/$XDG_CONFIG_HOME/nvim/snippets
. I think the problem is that $XDG_CONFIG_HOME isn't expanded properly and so is evaluated as a relative path.For reference, I use powershell and XDG_CONFIG_HOME is exported like so:
Set-Variable -Name "XDG_CONFIG_HOME" -Value "C:/Users/<username>/.config"