Rename options to avoid confusion with module options (#1324)

This commit is contained in:
Matt Sturgeon 2024-03-29 20:58:44 +00:00 committed by GitHub
parent acb917fbf2
commit 4f83bcf290
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 33 additions and 43 deletions

View file

@ -47,7 +47,7 @@ in {
};
config = {
options.clipboard = mkIf (cfg.register != null) cfg.register;
opts.clipboard = mkIf (cfg.register != null) cfg.register;
extraPackages =
mapAttrsToList

View file

@ -10,7 +10,7 @@
./highlights.nix
./keymaps.nix
./lua-loader.nix
./options.nix
./opts.nix
./output.nix
./plugins.nix
./warnings.nix

View file

@ -6,21 +6,21 @@
}:
with lib; let
optionsAttrs = {
options = {
opts = {
prettyName = "options";
luaVariableName = "options";
luaApi = "opt";
description = "The configuration options, e.g. line numbers (`vim.opt.*`)";
};
globalOptions = {
globalOpts = {
prettyName = "global options";
luaVariableName = "global_options";
luaApi = "opt_global";
description = "The configuration global options (`vim.opt_global.*`)";
};
localOptions = {
localOpts = {
prettyName = "local options";
luaVariableName = "local_options";
luaApi = "opt_local";
@ -47,6 +47,16 @@ in {
)
optionsAttrs;
# Added 2024-03-29 (do not remove)
imports =
mapAttrsToList
(old: new: mkRenamedOptionModule [old] [new])
{
options = "opts";
globalOptions = "globalOpts";
localOptions = "localOpts";
};
config = {
extraConfigLuaPre =
concatLines