Closed davidgranstrom closed 2 years ago
The current "hotfix" for this situation that I came up with in my feature branch is this: https://github.com/dvzrv/scnvim/commit/6274cabe20deb5ca18b22851f95e5852d0216065 This is unix-only and a little hacky.
I believe it would be useful to use g:scnvim_assets_dir
on all operating systems to let users (optionally) override the directory to create the assets in.
If not overridden, the location should default to the OS equivalent of what is XDG_DATA_HOME/scnvim on Linux (falls back to ~/.local/share/scnvim/
).
I haven't investigated yet, but I believe that this would make the use of g:scnvim_root_dir
obsolete.
Sorry for not being very active about this issue. I'm just writing this down here so I don't forget it going forward.
I think we could use stdpath("data")
for this and possibly deprecate the viml variable g:scnvim_root_dir
(the lua function is still needed for installation). This will probably be done in a PR that unifies path handling for all platforms (its a bit scattered at the moment).
Copied this from the docs of stdpath
:
DATA DIRECTORY (DEFAULT) ~
*$XDG_DATA_HOME* Nvim: stdpath("data")
Unix: ~/.local/share ~/.local/share/nvim
Windows: ~/AppData/Local ~/AppData/Local/nvim-data
See discussion in #134