From d12ba436b16bea6372d8be5156c4c77b8ff0c45c Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Fri, 22 May 2026 16:27:40 +0200 Subject: [PATCH] rc/options: use vim.opt for structured options --- modules/wrapper/rc/config.nix | 2 +- modules/wrapper/rc/options.nix | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/wrapper/rc/config.nix b/modules/wrapper/rc/config.nix index 50211d2e..ad2d513e 100644 --- a/modules/wrapper/rc/config.nix +++ b/modules/wrapper/rc/config.nix @@ -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"; diff --git a/modules/wrapper/rc/options.nix b/modules/wrapper/rc/options.nix index 7ba15bd8..3d99f044 100644 --- a/modules/wrapper/rc/options.nix +++ b/modules/wrapper/rc/options.nix @@ -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. ::: ''; };