mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-12-16 17:11:02 +00:00
wrapper/rc: add examples to vim.options & vim.globals; wording
This commit is contained in:
parent
56b4b11efe
commit
8b29ba9e23
1 changed files with 8 additions and 6 deletions
|
|
@ -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.
|
||||||
:::
|
:::
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue