neovimhaskell / nvim-hs

Neovim API for Haskell plugins as well as the plugin provider
Other
267 stars 18 forks source link

nvim.hs location for Mac? #37

Closed gibiansky closed 9 years ago

gibiansky commented 9 years ago

From the docs:

Create a file called nvim.hs in $XDG_CONFIG_HOME/nvim (usually ~/.config/nvim with the following content:

$XDG_CONFIG_HOME does not necessarily exist on OS X. What's the right place to put nvim.hs on Mac? How can we customize the location of this file?

gibiansky commented 9 years ago

Based on the fact that stack.yaml mentions xdg-basedir, my guess is that nvim-hs is using getUserConfigDir from `System.Environment.XDG.BaseDir

$ stack exec ghci
GHCi, version 7.10.1: http://www.haskell.org/ghc/  :? for help
Prelude> import System.Environment.XDG.BaseDir
Prelude System.Environment.XDG.BaseDir> getUserConfigDir "nvim"
"/Users/silver/.config/nvim"

So on my system at least (and I guess on OSX in general?) it is ~/.config/nvim/nvim.hs.

I'm not yet sure this is true but this could be in the docs.

gibiansky commented 9 years ago

Wait, I guess it is in the docs. Hmm. I just assumed it only applied on systems where $XDG* was actually defied. Oops.

saep commented 9 years ago

It should probably be reflected in the docs, that ~/.config/nvim is the default location if the environment variable is not set. A link to http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html doesn't hurt either.