aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Rittner Coelho <116819854+eduardorittner@users.noreply.github.com>2023-09-20 06:04:30 -0300
committerGitHub <noreply@github.com>2023-09-20 02:04:30 -0700
commitb6ef938c663bc930a42bf1b15d7e97efcd4904b6 (patch)
treeaa931180c3b86a7b97469e0fa3f46ec335e8e816
parentacde86d43690cf6451793250ae7ada4254bc2be3 (diff)
downloadrneovim-b6ef938c663bc930a42bf1b15d7e97efcd4904b6.tar.gz
rneovim-b6ef938c663bc930a42bf1b15d7e97efcd4904b6.tar.bz2
rneovim-b6ef938c663bc930a42bf1b15d7e97efcd4904b6.zip
docs: document $XDG environment variables #25227
-rw-r--r--runtime/doc/starting.txt33
1 files changed, 28 insertions, 5 deletions
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
index 5f6e932693..17d5b4668d 100644
--- a/runtime/doc/starting.txt
+++ b/runtime/doc/starting.txt
@@ -1362,9 +1362,9 @@ paths.
*base-directories* *xdg*
The "base" (root) directories conform to the XDG Base Directory Specification.
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
-The $XDG_CONFIG_HOME, $XDG_DATA_HOME, $XDG_RUNTIME_DIR, and $XDG_STATE_HOME
-environment variables are used if defined, else default values (listed below)
-are used.
+The $XDG_CONFIG_HOME, $XDG_DATA_HOME, $XDG_RUNTIME_DIR, $XDG_STATE_HOME,
+$XDG_CACHE_HOME, $XDG_CONFIG_DIRS and $XDG_DATA_DIRS environment variables
+are used if defined, else default values (listed below) are used.
CONFIG DIRECTORY (DEFAULT) ~
*$XDG_CONFIG_HOME* Nvim: stdpath("config")
@@ -1386,9 +1386,32 @@ STATE DIRECTORY (DEFAULT) ~
Unix: ~/.local/state ~/.local/state/nvim
Windows: ~/AppData/Local ~/AppData/Local/nvim-data
+CACHE DIRECTORY (DEFAULT) ~
+ *$XDG_CACHE_HOME* Nvim: stdpath("cache")
+ Unix: ~/.cache ~/.cache/nvim
+ Windows: ~/AppData/Local/Temp ~/AppData/Local/Temp/nvim-data
+
+LOG FILE (DEFAULT) ~
+ `$NVIM_LOG_FILE` Nvim: stdpath("log")
+ Unix: ~/.local/state/nvim ~/.local/state/nvim/log
+ Windows: ~/AppData/Local/nvim-data ~/AppData/Local/nvim-data/log
+
+ADDITIONAL CONFIGS DIRECTORY (DEFAULT) ~
+ *$XDG_CONFIG_DIRS* Nvim: stdpath("config_dirs")
+ Unix: /etc/xdg/ /etc/xdg/nvim
+ Windows: Not applicable Not applicable
+
+ADDITIONAL DATA DIRECTORY (DEFAULT) ~
+ *$XDG_DATA_DIRS* Nvim: stdpath("data_dirs")
+ Unix: /usr/local/share /usr/local/share/nvim
+ /usr/share /usr/share/nvim
+ Windows: Not applicable Not applicable
+
Note: Throughout the help pages these defaults are used as placeholders, e.g.
"~/.config" is understood to mean "$XDG_CONFIG_HOME or ~/.config".
+Note: The log file directory is controlled by `$XDG_STATE_HOME`.
+
NVIM_APPNAME *$NVIM_APPNAME*
The standard directories can be further configured by the `$NVIM_APPNAME`
environment variable. This variable controls the sub-directory that Nvim will
@@ -1408,8 +1431,8 @@ LOG FILE *log* *$NVIM_LOG_FILE* *E5430*
Besides 'debug' and 'verbose', Nvim keeps a general log file for internal
debugging, plugins and RPC clients. >
:echo $NVIM_LOG_FILE
-By default, the file is located at stdpath("log")/log unless that path
-is inaccessible or if $NVIM_LOG_FILE was set before |startup|.
+By default, the file is located at stdpath("log")/log ($XDG_STATE_HOME/nvim/log)
+unless that path is inaccessible or if $NVIM_LOG_FILE was set before |startup|.
vim:noet:tw=78:ts=8:ft=help:norl: