mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
core: show warnings for deprecated or changed options (#129)
* moved helpers to lib folder * Created proxy file for helpers.nix * wrappers: removed code duplication * null-ls: fix wrong name of variable * added warnings module * Added assertions * bufferline: deprecated option * nvim-tree: renamed options * Fixed mkRenamedOption * Bufferline: added new options * Fixed deprecated option Co-authored-by: Pedro Alves <pta2002@pta2002.com>
This commit is contained in:
parent
5fac9be0ab
commit
63c256dc3d
10 changed files with 369 additions and 206 deletions
|
@ -1,8 +1,9 @@
|
|||
modules:
|
||||
{ pkgs, config, lib, ... }:
|
||||
{ pkgs, config, lib, ... }@args:
|
||||
|
||||
let
|
||||
inherit (lib) mkEnableOption mkOption mkOptionType mkMerge mkIf types;
|
||||
shared = import ./_shared.nix args;
|
||||
cfg = config.programs.nixvim;
|
||||
in
|
||||
{
|
||||
|
@ -12,15 +13,7 @@ in
|
|||
options.enable = mkEnableOption "nixvim";
|
||||
}]);
|
||||
};
|
||||
nixvim.helpers = mkOption {
|
||||
type = mkOptionType {
|
||||
name = "helpers";
|
||||
description = "Helpers that can be used when writing nixvim configs";
|
||||
check = builtins.isAttrs;
|
||||
};
|
||||
description = "Use this option to access the helpers";
|
||||
default = import ../plugins/helpers.nix { inherit (pkgs) lib; };
|
||||
};
|
||||
nixvim.helpers = shared.helpers;
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable
|
||||
|
@ -30,5 +23,9 @@ in
|
|||
environment.etc."nvim/sysinit.lua".text = cfg.initContent;
|
||||
environment.variables."VIM" = "/etc/nvim";
|
||||
})
|
||||
({
|
||||
warnings = cfg.warnings;
|
||||
assertions = cfg.assertions;
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue