Home Explore Blog CI



neovim

22th chunk of `runtime/doc/starting.txt`
ed8f6d82eb56c6d8803bf04d79904810a8ee82cc64af185d00000001000009a0

|shada-error-handling|.
When reading, critical errors cause the rest of the file to be skipped.
Critical errors include:
					    *shada-critical-contents-errors*
- Any of first three MessagePack objects being not an unsigned integer.
- Third object requesting amount of bytes greater then bytes left in the ShaDa
  file.
- Entry with zero type.  I.e. first object being equal to zero.
- MessagePack parser failing to parse the entry data.
- MessagePack parser consuming less or requesting greater bytes then described
  in the third object for parsing fourth object.  I.e. when fourth object
  either contains more then one MessagePack object or it does not contain
  complete MessagePack object.

==============================================================================
Standard Paths					*standard-path*

Nvim stores configuration, data, and logs in standard locations. Plugins are
strongly encouraged to follow this pattern also. Use |stdpath()| to get the
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, $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.

Note: In the help these defaults are used as placeholders, e.g. "~/.config" is
understood as "$XDG_CONFIG_HOME or ~/.config".

CONFIG DIRECTORY (DEFAULT) ~
                  *$XDG_CONFIG_HOME*            Nvim: stdpath("config")
    Unix:         ~/.config                   ~/.config/nvim
    Windows:      ~/AppData/Local             ~/AppData/Local/nvim

DATA DIRECTORY (DEFAULT) ~
                  *$XDG_DATA_HOME*              Nvim: stdpath("data")
    Unix:         ~/.local/share              ~/.local/share/nvim
    Windows:      ~/AppData/Local             ~/AppData/Local/nvim-data

RUN DIRECTORY (DEFAULT) ~
                  *$XDG_RUNTIME_DIR*            Nvim: stdpath("run")
    Unix:         /tmp/nvim.user/xxx          /tmp/nvim.user/xxx
    Windows:      $TMP/nvim.user/xxx          $TMP/nvim.user/xxx

STATE DIRECTORY (DEFAULT) ~
                  *$XDG_STATE_HOME*             Nvim: stdpath("state")
    Unix:         ~/.local/state              ~/.local/state/nvim
    Windows:      ~/AppData/Local             ~/AppData/Local/nvim-data

CACHE DIRECTORY (DEFAULT) ~
 

Title: ShaDa Critical Errors and Standard Paths
Summary
This section describes the types of critical errors that can occur when reading a ShaDa file, causing the rest of the file to be skipped, including issues with MessagePack objects. It then details the standard paths Nvim uses for configuration, data, logs, run, state and cache, encouraging plugins to follow this pattern. It references the XDG Base Directory Specification and lists the default directories for Unix and Windows systems.