mirror of
https://github.com/neovim/neovim.git
synced 2025-09-26 21:18:34 +00:00
docs: misc, dev-api-fast, $XDG_STATE_HOME #35138
This commit is contained in:
@@ -11392,8 +11392,8 @@ M.funcs = {
|
||||
log String Logs directory (for use by plugins too).
|
||||
run String Run directory: temporary, local storage
|
||||
for sockets, named pipes, etc.
|
||||
state String Session state directory: storage for file
|
||||
drafts, swap, undo, |shada|.
|
||||
state String Session state: storage for backupdir,
|
||||
file drafts, |shada|, swap, undo, 'viewdir'.
|
||||
|
||||
Example: >vim
|
||||
echo stdpath("config")
|
||||
|
@@ -2261,29 +2261,25 @@ int tv_dict_get_tv(dict_T *d, const char *const key, typval_T *rettv)
|
||||
return OK;
|
||||
}
|
||||
|
||||
/// Get a number item from a dictionary
|
||||
///
|
||||
/// Returns 0 if the entry does not exist.
|
||||
/// Gets a number item from a dictionary.
|
||||
///
|
||||
/// @param[in] d Dictionary to get item from.
|
||||
/// @param[in] key Key to find in dictionary.
|
||||
///
|
||||
/// @return Dictionary item.
|
||||
/// @return Number value, or 0 if the item does not exist.
|
||||
varnumber_T tv_dict_get_number(const dict_T *const d, const char *const key)
|
||||
FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
|
||||
{
|
||||
return tv_dict_get_number_def(d, key, 0);
|
||||
}
|
||||
|
||||
/// Get a number item from a dictionary.
|
||||
///
|
||||
/// Returns "def" if the entry doesn't exist.
|
||||
/// Gets a number item from a dictionary, or a given default value.
|
||||
///
|
||||
/// @param[in] d Dictionary to get item from.
|
||||
/// @param[in] key Key to find in dictionary.
|
||||
/// @param[in] def Default value.
|
||||
///
|
||||
/// @return Dictionary item.
|
||||
/// @return Number value, or `def` value if the item does not exist.
|
||||
varnumber_T tv_dict_get_number_def(const dict_T *const d, const char *const key, const int def)
|
||||
FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
|
||||
{
|
||||
|
@@ -7088,12 +7088,9 @@ local options = {
|
||||
but are not part of the Nvim distribution. XDG_DATA_DIRS defaults
|
||||
to /usr/local/share/:/usr/share/, so system administrators are
|
||||
expected to install site plugins to /usr/share/nvim/site.
|
||||
5. Session state directory, for state data such as swap, backupdir,
|
||||
viewdir, undodir, etc.
|
||||
Given by `stdpath("state")`. |$XDG_STATE_HOME|
|
||||
6. $VIMRUNTIME, for files distributed with Nvim.
|
||||
5. $VIMRUNTIME, for files distributed with Nvim.
|
||||
*after-directory*
|
||||
7, 8, 9, 10. In after/ subdirectories of 1, 2, 3 and 4, with reverse
|
||||
6, 7, 8, 9. In after/ subdirectories of 1, 2, 3 and 4, with reverse
|
||||
ordering. This is for preferences to overrule or add to the
|
||||
distributed defaults or system-wide settings (rarely needed).
|
||||
|
||||
|
Reference in New Issue
Block a user