diff options
author | TJ DeVries <devries.timothyj@gmail.com> | 2020-12-03 20:59:36 -0500 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2020-12-04 13:29:44 +0100 |
commit | ced951c2aacd175c21c68a5bbf7fdf459954d0ab (patch) | |
tree | 98ef9f3e7fb6072d94b8424ba77de80ba8d35892 /src/nvim/api/vim.c | |
parent | 3b3c006ae34256637f101ea85a84998377f56e40 (diff) | |
download | rneovim-ced951c2aacd175c21c68a5bbf7fdf459954d0ab.tar.gz rneovim-ced951c2aacd175c21c68a5bbf7fdf459954d0ab.tar.bz2 rneovim-ced951c2aacd175c21c68a5bbf7fdf459954d0ab.zip |
api/options: fixup
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r-- | src/nvim/api/vim.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index b3576bc436..a95aa0f170 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -970,12 +970,38 @@ Object nvim_get_option(String name, Error *err) return get_option_from(NULL, SREQ_GLOBAL, name, err); } +/// Gets the option information for all options. +/// @return Map<option_name, option_info> Dictionary nvim_get_options_info(Error *err) FUNC_API_SINCE(7) { return get_all_vimoptions(); } +/// Gets the option information for one option +/// +/// Resulting dictionary has keys: +/// - name (string): Name of the option +/// - shortname (shortname): Shortened name of the option +/// - type (string): Name of the type of option +/// - default (Any): The default value for the option +/// +/// Script-Related Keys: +/// - was_set (bool): Whether the option was set. +/// - last_set_sid (int): Last set script id +/// - last_set_linenr (int): Last set script id, -1 if invalid. +/// - last_set_lchan (int): Last set script id, -1 if invalid. +/// +/// Flag-Related Keys: +/// - win (bool): Window-local option +/// - buf (bool): Buffer-local option +/// - global_local (bool): Global or Buffer local option +/// - flaglist (bool): List of single char flags +/// +/// +/// @param name Option name +/// @param[out] err Error details, if any +/// @return Option Information Dictionary nvim_get_option_info(String name, Error *err) FUNC_API_SINCE(7) { |