aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorYochem van Rosmalen <git@yochem.nl>2025-04-04 14:21:57 +0200
committerGitHub <noreply@github.com>2025-04-04 05:21:57 -0700
commitb10cb0296ae299e4f97335c201ccbf8da753b2a6 (patch)
treee2b14fc0fe3844dd448798faadfa904000d5478d /runtime
parent4983fa45fcfb420a38112e782b2a30baf9cc05d2 (diff)
downloadrneovim-b10cb0296ae299e4f97335c201ccbf8da753b2a6.tar.gz
rneovim-b10cb0296ae299e4f97335c201ccbf8da753b2a6.tar.bz2
rneovim-b10cb0296ae299e4f97335c201ccbf8da753b2a6.zip
feat(defaults): store spellfile in stdpath('data') #33048
Problem: First rtp directory is unpredictable and not in line with XDG base spec. Solution: Use stdpath('data')/spell as directory if 'spellfile' is not set. Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/news.txt3
-rw-r--r--runtime/doc/options.txt9
-rw-r--r--runtime/doc/vim_diff.txt1
-rw-r--r--runtime/lua/vim/_meta/options.lua9
4 files changed, 11 insertions, 11 deletions
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 72d394dd68..8842d370ad 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -177,7 +177,8 @@ CHANGED FEATURES *news-changed*
These existing features changed their behavior.
-• todo
+• 'spellfile' location defaults to `stdpath("data").."/spell/"` instead of the
+ first writable directoy in 'runtimepath'.
==============================================================================
REMOVED FEATURES *news-removed*
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 25909e09b9..972d2cce51 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -5755,11 +5755,10 @@ A jump table for the options with a short description can be found at |Q_op|.
It may also be a comma-separated list of names. A count before the
|zg| and |zw| commands can be used to access each. This allows using
a personal word list file and a project word list file.
- When a word is added while this option is empty Vim will set it for
- you: Using the first directory in 'runtimepath' that is writable. If
- there is no "spell" directory yet it will be created. For the file
- name the first language name that appears in 'spelllang' is used,
- ignoring the region.
+ When a word is added while this option is empty Nvim will use
+ (and auto-create) `stdpath('data')/spell/`. For the file name the
+ first language name that appears in 'spelllang' is used, ignoring the
+ region.
The resulting ".spl" file will be used for spell checking, it does not
have to appear in 'spelllang'.
Normally one file is used for all regions, but you can add the region
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index a5c72363b4..d475ef1f3d 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -79,6 +79,7 @@ Defaults *defaults* *nvim-defaults*
- 'showcmd' is enabled
- 'sidescroll' defaults to 1
- 'smarttab' is enabled
+- 'spellfile' defaults to `stdpath("data").."/spell/"`
- 'startofline' is disabled
- 'switchbuf' defaults to "uselast"
- 'tabpagemax' defaults to 50
diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua
index 8a582ada23..0fc8518aa4 100644
--- a/runtime/lua/vim/_meta/options.lua
+++ b/runtime/lua/vim/_meta/options.lua
@@ -6123,11 +6123,10 @@ vim.bo.spc = vim.bo.spellcapcheck
--- It may also be a comma-separated list of names. A count before the
--- `zg` and `zw` commands can be used to access each. This allows using
--- a personal word list file and a project word list file.
---- When a word is added while this option is empty Vim will set it for
---- you: Using the first directory in 'runtimepath' that is writable. If
---- there is no "spell" directory yet it will be created. For the file
---- name the first language name that appears in 'spelllang' is used,
---- ignoring the region.
+--- When a word is added while this option is empty Nvim will use
+--- (and auto-create) `stdpath('data')/spell/`. For the file name the
+--- first language name that appears in 'spelllang' is used, ignoring the
+--- region.
--- The resulting ".spl" file will be used for spell checking, it does not
--- have to appear in 'spelllang'.
--- Normally one file is used for all regions, but you can add the region