plugins/git: add git-conflict-nvim (#637)

* plugins/git: add git-conflict-nvim; modularize

* plugins/git: build git-conflict-nvim ourselves
This commit is contained in:
Ben Mayer 2025-02-14 12:57:21 +01:00 committed by GitHub
commit a86df770c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 88 additions and 1 deletions

View file

@ -0,0 +1,23 @@
{
config,
lib,
...
}: let
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.binds) mkMappingOption;
inherit (lib.nvim.types) mkPluginSetupOption;
in {
options.vim.git.git-conflict = {
enable = mkEnableOption "git-conflict" // {default = config.vim.git.enable;};
setupOpts = mkPluginSetupOption "git-conflict" {};
mappings = {
ours = mkMappingOption "Choose Ours [Git-Conflict]" "co";
theirs = mkMappingOption "Choose Theirs [Git-Conflict]" "ct";
both = mkMappingOption "Choose Both [Git-Conflict]" "cb";
none = mkMappingOption "Choose None [Git-Conflict]" "c0";
prevConflict = mkMappingOption "Go to the previous Conflict [Git-Conflict]" "]x";
nextConflict = mkMappingOption "Go to the next Conflict [Git-Conflict]" "[x";
};
};
}