mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 15:58:17 +00:00
Merge pull request #3540 from fmoralesc/fix-spellfile
spellfile: follow the XDG spec
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user