aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2015-10-28 09:52:49 -0400
committerJustin M. Keyes <justinkz@gmail.com>2015-10-28 09:52:49 -0400
commitdc8b0c47b10a5a7a1280a768b181f23bd990ab6e (patch)
treec091e4ed717aee1ba6584f990f225fde36d82fe8
parent454b087dda1911b2523f48e03a9ea667ed14f806 (diff)
parent6b6f018f84e8e2c74dbcf79e8b8214fd0622b43a (diff)
downloadrneovim-dc8b0c47b10a5a7a1280a768b181f23bd990ab6e.tar.gz
rneovim-dc8b0c47b10a5a7a1280a768b181f23bd990ab6e.tar.bz2
rneovim-dc8b0c47b10a5a7a1280a768b181f23bd990ab6e.zip
Merge pull request #3540 from fmoralesc/fix-spellfile
spellfile: follow the XDG spec
-rw-r--r--runtime/autoload/spellfile.vim8
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/autoload/spellfile.vim b/runtime/autoload/spellfile.vim
index 5b1079e919..c32dd5df9b 100644
--- a/runtime/autoload/spellfile.vim
+++ b/runtime/autoload/spellfile.vim
@@ -196,9 +196,11 @@ function! spellfile#GetDirChoices()
endfunc
function! spellfile#WritableSpellDir()
- if has("unix")
- " For Unix always use the $HOME/.nvim directory
- return $HOME . "/.nvim/spell"
+ " Always use the $XDG_DATA_HOME/nvim/site directory
+ if exists('$XDG_DATA_HOME')
+ return $XDG_DATA_HOME . "/nvim/site/spell"
+ else
+ return $HOME . "/.local/share/nvim/site/spell"
endif
for dir in split(&rtp, ',')
if filewritable(dir) == 2