Open learningjs opened 8 years ago
Could you tell me output of below command?
echo $XDG_CONFIG_HOME
And if you can, could you tell me appData
directory? How to try is:
require('electron').remote.app.getPath('appData')
in consoleAre you able to reproduce the behaviour?
echo $XDG_CONFIG_HOME ~/.config
require('electron').remote.app.getPath('appData') "/home/user/~/.config"
I forgot to specify that I use i3wm, if that matters.
Are you able to reproduce the behaviour?
No, I can't reproduce this yet. I tried setting export XDG_CONFIG_HOME=~/.config
, but the path to config directory was correctly ~/.config/nyaovim
. This may be because I don't have Linux environment temporarily and I tried it in OS X.
Thank you for your cooperation.
"/home/user/~/.config"
This is weird... It should be "/home/user/.config"
, I think. Are you setting $XDG_CONFIG_HOME
in your shell config file? If so, changing it as below may resolve this issue.
export $XDG_CONFIG_HOME=$HOME/.config
If changing to above config resolves this issue, I think this is a bug of Electron's getPath()
API (~
is not considered).
Thank you
export $XDG_CONFIG_HOME=$HOME/.config
solved the issue on Arch (I had it set to ~/.config). I will test more, but for what I see everything is working as expected now.
Pretty interesting... on Ubuntu looks like everything is fine from installation to launch (no weird recursive folders, creates regular folder in ~/.config, etc), but Nyaovim opens always as it does not read the config file. Further investigation coming :)
I found the reason. Please read XDG base directory spec below.
http://standards.freedesktop.org/basedir-spec/latest/ar01s02.html
All paths set in these environment variables must be absolute.
So ~/.config
is invalid for $XDG_CONFIG_HOME
. You should use $HOME/.config
.
Sorry, I closed issue wrongly.
Nyaovim opens always as it does not read the config file
Hmm... you mean nyaovimrc.html
is not loaded?
you mean nyaovimrc.html is not loaded?
seems that is what happens, but I did not further investigated the issue
OK, thanks.
Nyaovim opens always as it does not read the config file.
BTW, nvim/init.vim
or nyaovimrc.html
, which the 'config file' meant? (if you remember :smiley:)
I mean looks like nyaovimrc.html is not loaded. I remember that I have changed the font size and on Arch did worked, but not on Ubuntu .
Not sure about nvim/init.vim . I guess this is loaded, but I do not have the Ubuntu box to hand right now.
And thank you for the XDG hint.
Running NyaoVim for the first time, it logs:
subsequent times (always):
I can be wrong, but I expected to be ~/.config/nyaovim/nyaovimrc.html
If I create manually ~/.config/nyaovim/nyaovimrc.html and run again NyaoVim no more initial messages are showed, but the configuration used by it is: