Merge pull request #1614 from horriblename/rc-vim-opt
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Treewide Checks / Validate flake (push) Has been cancelled
Treewide Checks / Check formatting (push) Has been cancelled
Treewide Checks / Check source tree for typos (push) Has been cancelled
Treewide Checks / Validate documentation builds (push) Has been cancelled
Treewide Checks / Validate documentation builds-1 (push) Has been cancelled
Treewide Checks / Validate documentation builds-2 (push) Has been cancelled
Treewide Checks / Validate documentation builds-3 (push) Has been cancelled
Treewide Checks / Validate hyperlinks in documentation sources (push) Has been cancelled
Treewide Checks / Validate Editorconfig conformance (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled

wrapper/options: use `vim.opt` for structured options
This commit is contained in:
raf 2026-05-22 14:57:16 +00:00 committed by GitHub
commit 21849b62be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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.
:::
'';
};