plugins/git: add vim-fugitive; modularize

This commit is contained in:
raf 2024-04-14 18:33:16 +03:00
commit f78696f13b
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
12 changed files with 206 additions and 130 deletions

View file

@ -0,0 +1,13 @@
{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
cfg = config.vim.git.vim-fugitive;
in {
config = mkIf cfg.enable {
vim.startPlugins = ["vim-fugitive"];
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./config.nix
./vim-fugitive.nix
];
}

View file

@ -0,0 +1,14 @@
{
config,
lib,
...
}: let
inherit (lib.options) mkEnableOption;
in {
options.vim.git.vim-fugitive = {
enable = mkEnableOption "vim-fugitive" // {default = config.vim.git.enable;};
# TODO: sane default keybinds for vim-fugitive
# mappings = {};
};
}