mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-25 11:45:27 +02:00
treewide: Reformat with nixfmt
This commit is contained in:
parent
c6281260dc
commit
62f32bfc71
459 changed files with 28139 additions and 26377 deletions
|
@ -2,66 +2,69 @@
|
|||
modules,
|
||||
self,
|
||||
getHelpers,
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
} @ args: let
|
||||
inherit (lib) mkEnableOption mkOption mkOptionType mkForce mkMerge mkIf types;
|
||||
}@args:
|
||||
let
|
||||
inherit (lib)
|
||||
mkEnableOption
|
||||
mkOption
|
||||
mkOptionType
|
||||
mkForce
|
||||
mkMerge
|
||||
mkIf
|
||||
types
|
||||
;
|
||||
helpers = getHelpers pkgs false;
|
||||
shared = import ./_shared.nix {inherit modules helpers;} args;
|
||||
shared = import ./_shared.nix { inherit modules helpers; } args;
|
||||
cfg = config.programs.nixvim;
|
||||
files =
|
||||
shared.configFiles
|
||||
// {
|
||||
"nvim/sysinit.lua".text = cfg.initContent;
|
||||
};
|
||||
in {
|
||||
files = shared.configFiles // {
|
||||
"nvim/sysinit.lua".text = cfg.initContent;
|
||||
};
|
||||
in
|
||||
{
|
||||
options = {
|
||||
programs.nixvim = mkOption {
|
||||
default = {};
|
||||
default = { };
|
||||
type = types.submoduleWith {
|
||||
shorthandOnlyDefinesConfig = true;
|
||||
specialArgs = {
|
||||
nixosConfig = config;
|
||||
inherit helpers;
|
||||
};
|
||||
modules =
|
||||
[
|
||||
{
|
||||
options = {
|
||||
enable = mkEnableOption "nixvim";
|
||||
defaultEditor = mkEnableOption "nixvim as the default editor";
|
||||
};
|
||||
config.wrapRc = mkForce true;
|
||||
}
|
||||
]
|
||||
++ shared.topLevelModules;
|
||||
modules = [
|
||||
{
|
||||
options = {
|
||||
enable = mkEnableOption "nixvim";
|
||||
defaultEditor = mkEnableOption "nixvim as the default editor";
|
||||
};
|
||||
config.wrapRc = mkForce true;
|
||||
}
|
||||
] ++ shared.topLevelModules;
|
||||
};
|
||||
};
|
||||
nixvim.helpers = shared.helpers;
|
||||
};
|
||||
|
||||
config =
|
||||
mkIf cfg.enable
|
||||
(mkMerge [
|
||||
{
|
||||
environment.systemPackages =
|
||||
[
|
||||
cfg.finalPackage
|
||||
cfg.printInitPackage
|
||||
]
|
||||
++ (lib.optional cfg.enableMan self.packages.${pkgs.system}.man-docs);
|
||||
}
|
||||
(mkIf (!cfg.wrapRc) {
|
||||
environment.etc = files;
|
||||
environment.variables."VIM" = "/etc/nvim";
|
||||
})
|
||||
{
|
||||
inherit (cfg) warnings assertions;
|
||||
programs.neovim.defaultEditor = cfg.defaultEditor;
|
||||
environment.variables.EDITOR = mkIf cfg.defaultEditor (lib.mkOverride 900 "nvim");
|
||||
}
|
||||
]);
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
{
|
||||
environment.systemPackages = [
|
||||
cfg.finalPackage
|
||||
cfg.printInitPackage
|
||||
] ++ (lib.optional cfg.enableMan self.packages.${pkgs.system}.man-docs);
|
||||
}
|
||||
(mkIf (!cfg.wrapRc) {
|
||||
environment.etc = files;
|
||||
environment.variables."VIM" = "/etc/nvim";
|
||||
})
|
||||
{
|
||||
inherit (cfg) warnings assertions;
|
||||
programs.neovim.defaultEditor = cfg.defaultEditor;
|
||||
environment.variables.EDITOR = mkIf cfg.defaultEditor (lib.mkOverride 900 "nvim");
|
||||
}
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue