mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-02 00:54:48 +02:00
added formatter + reformat existing codebase (#175)
This commit is contained in:
parent
0bf4313f22
commit
264de8cefb
96 changed files with 3727 additions and 3341 deletions
|
@ -1,31 +1,36 @@
|
|||
modules:
|
||||
{ pkgs, config, lib, ... }@args:
|
||||
|
||||
let
|
||||
modules: {
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
} @ args: let
|
||||
inherit (lib) mkEnableOption mkOption mkOptionType mkMerge mkIf types;
|
||||
shared = import ./_shared.nix args;
|
||||
cfg = config.programs.nixvim;
|
||||
in
|
||||
{
|
||||
in {
|
||||
options = {
|
||||
programs.nixvim = mkOption {
|
||||
type = types.submodule ((modules pkgs) ++ [{
|
||||
options.enable = mkEnableOption "nixvim";
|
||||
}]);
|
||||
type = types.submodule ((modules pkgs)
|
||||
++ [
|
||||
{
|
||||
options.enable = mkEnableOption "nixvim";
|
||||
}
|
||||
]);
|
||||
};
|
||||
nixvim.helpers = shared.helpers;
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable
|
||||
config =
|
||||
mkIf cfg.enable
|
||||
(mkMerge [
|
||||
{ environment.systemPackages = [ cfg.finalPackage ]; }
|
||||
{environment.systemPackages = [cfg.finalPackage];}
|
||||
(mkIf (!cfg.wrapRc) {
|
||||
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