diff --git a/configuration.nix b/configuration.nix index 11f3fa10..28b146d4 100644 --- a/configuration.nix +++ b/configuration.nix @@ -13,6 +13,9 @@ isMaximal: { logFile = "/tmp/nvim.log"; }; + # vim.opts and vim.options are aliased + opts.expandtab = true; + spellcheck = { enable = true; programmingWordlist.enable = isMaximal; diff --git a/modules/neovim/init/basic.nix b/modules/neovim/init/basic.nix index 2f3934ae..85c07a53 100644 --- a/modules/neovim/init/basic.nix +++ b/modules/neovim/init/basic.nix @@ -78,6 +78,11 @@ in { }; }; + # Alias vim.options as vim.opts. + # This is a convenience for people using frameworks like flake-parts or Den that use lib.types.deferredModule + # and users would set `vim.options` but error when Nix confuses it with Nix Module's options-definitions. + imports = [(lib.mkAliasOptionModule ["vim" "opts"] ["vim" "options"])]; + config.vim = { # Set options that were previously interpolated in 'luaConfigRC.basic' as vim.options (vim.o) # and 'vim.globals' (vim.g). Future options, if possible, should be added here instead of the