added formatter + reformat existing codebase (#175)

This commit is contained in:
Gaétan Lepage 2023-02-20 11:42:13 +01:00 committed by GitHub
parent 0bf4313f22
commit 264de8cefb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
96 changed files with 3727 additions and 3341 deletions

View file

@ -1,8 +1,12 @@
{ config, lib, pkgs, ... }:
with lib;
let
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.plugins.neogit;
helpers = import ../helpers.nix { inherit lib; };
helpers = import ../helpers.nix {inherit lib;};
sectionDefaultsModule = types.submodule {
options = {
@ -12,8 +16,7 @@ let
};
};
};
in
{
in {
options = {
plugins.neogit = {
enable = mkEnableOption "neogit";
@ -72,7 +75,7 @@ in
};
};
};
default = { };
default = {};
};
kind = mkOption {
@ -104,7 +107,7 @@ in
};
};
};
default = { };
default = {};
};
integrations = mkOption {
@ -118,7 +121,7 @@ in
};
};
};
default = { };
default = {};
};
sections = mkOption {
@ -162,7 +165,7 @@ in
};
};
};
default = { };
default = {};
};
mappings = mkOption {
@ -198,14 +201,14 @@ in
};
};
};
default = { };
default = {};
};
};
};
config =
let
setupOptions = with cfg; helpers.toLuaObject {
config = let
setupOptions = with cfg;
helpers.toLuaObject {
inherit kind integrations signs sections mappings;
disable_signs = disableSigns;
disable_hint = disableHint;
@ -216,14 +219,16 @@ in
use_magit_keybindings = useMagitKeybindings;
commit_popup = commitPopup;
};
in
in
mkIf cfg.enable {
extraPlugins = with pkgs.vimPlugins; [
cfg.package
plenary-nvim
] ++ optional cfg.integrations.diffview diffview-nvim;
extraPlugins = with pkgs.vimPlugins;
[
cfg.package
plenary-nvim
]
++ optional cfg.integrations.diffview diffview-nvim;
extraPackages = [ pkgs.git ];
extraPackages = [pkgs.git];
extraConfigLua = ''
require('neogit').setup(${setupOptions})