rc/options: use vim.opt for structured options

This commit is contained in:
Ching Pei Yang 2026-05-22 16:27:40 +02:00
commit d12ba436b1
No known key found for this signature in database
GPG key ID: B3841364253DC4C8
2 changed files with 4 additions and 4 deletions

View file

@ -18,7 +18,7 @@ in {
mapAttrsToList (name: value: "vim.g.${name} = ${toLuaObject value}") cfg.globals;
optionsScript =
mapAttrsToList (name: value: "vim.o.${name} = ${toLuaObject value}") cfg.options;
mapAttrsToList (name: value: "vim.opt.${name} = ${toLuaObject value}") cfg.options;
extraPluginConfigs = resolveDag {
name = "extra plugin configs";

View file

@ -266,9 +266,9 @@ in {
after `basic` and before `pluginConfigs` DAG entries.
::: {.note}
`{foo = "bar";}` will set `vim.o.foo` to "bar", where the type of `bar` in the
resulting Lua value will be inferred from the type of the value in the
`{name = value;}` pair passed to the option.
`{foo = "bar";}` will set `vim.opt.foo` to "bar", where the type of
`bar` in the resulting Lua value will be inferred from the type of the
value in the `{name = value;}` pair passed to the option.
:::
'';
};