wrapper/rc: add examples to vim.options & vim.globals; wording

This commit is contained in:
raf 2024-09-28 21:06:41 +03:00
commit 8b29ba9e23
Signed by: NotAShelf
GPG key ID: AF26552424E53993

View file

@ -129,6 +129,7 @@ in {
globals = mkOption { globals = mkOption {
type = attrs; type = attrs;
default = {}; default = {};
example = {"some_variable" = 42;};
description = '' description = ''
An attribute set containing global variable values An attribute set containing global variable values
for storing vim variables as early as possible. If for storing vim variables as early as possible. If
@ -136,10 +137,10 @@ in {
built luaConfigRC as the first item. built luaConfigRC as the first item.
::: {.note} ::: {.note}
`{foo = "bar";}` will set `vim.g.foo` to "bar" where `{foo = "bar";}` will set `vim.g.foo` to "bar", where
the type of `bar` in the resulting Lua value will be the type of `bar` in the resulting Lua value will be
infered from the type of the value in the `{name = value;}` inferred from the type of the value in the `{name = value;}`
pair. pair passed to the option.
::: :::
''; '';
}; };
@ -147,6 +148,7 @@ in {
options = mkOption { options = mkOption {
type = attrs; type = attrs;
default = {}; default = {};
example = {visualbell = true;};
description = '' description = ''
An attribute set containing vim options to be set An attribute set containing vim options to be set
as early as possible. If populated, this option will as early as possible. If populated, this option will
@ -154,10 +156,10 @@ in {
and before `pluginConfigs` DAG entries. and before `pluginConfigs` DAG entries.
::: {.note} ::: {.note}
`{foo = "bar"}` will set `vim.o.foo` to "bar" where `{foo = "bar";}` will set `vim.o.foo` to "bar", where
the type of `bar` in the resulting Lua value will be the type of `bar` in the resulting Lua value will be
infered from the type of the value in the `{name = value}` inferred from the type of the value in the`{name = value;}`
pair. pair passed to the option.
::: :::
''; '';
}; };