mirror of
https://github.com/neovim/neovim
synced 2025-07-17 17:51:48 +00:00
spellfile.vim: store files in stdpath('data')
ref b9b2fb7d5d
#6664 #6272
This commit is contained in:
@ -195,16 +195,6 @@ function! spellfile#GetDirChoices()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
function! spellfile#WritableSpellDir()
|
function! spellfile#WritableSpellDir()
|
||||||
" Always use the $XDG_DATA_HOME/nvim/site directory
|
" Always use the $XDG_DATA_HOME/…/site directory
|
||||||
if exists('$XDG_DATA_HOME')
|
return stdpath('data').'/site/spell'
|
||||||
return $XDG_DATA_HOME . "/nvim/site/spell"
|
|
||||||
elseif !(has('win32') || has('win64'))
|
|
||||||
return $HOME . "/.local/share/nvim/site/spell"
|
|
||||||
endif
|
|
||||||
for dir in split(&rtp, ',')
|
|
||||||
if filewritable(dir) == 2
|
|
||||||
return dir . "/spell"
|
|
||||||
endif
|
|
||||||
endfor
|
|
||||||
return ''
|
|
||||||
endfunction
|
endfunction
|
||||||
|
Reference in New Issue
Block a user