nix-community.nixvim/plugins/by-name/git-conflict/default.nix
osbm a41559f093
Some checks are pending
Publish every Git push to main to FlakeHub / flakehub-publish (push) Waiting to run
Publish every git push to Flakestry / publish-flake (push) Waiting to run
Documentation / Version info (push) Waiting to run
Documentation / Build (push) Blocked by required conditions
Documentation / Combine builds (push) Blocked by required conditions
Documentation / Deploy (push) Blocked by required conditions
treewide: add plugin descriptions
2025-06-24 06:10:11 +00:00

93 lines
2.3 KiB
Nix

{
lib,
helpers,
...
}:
with lib;
lib.nixvim.plugins.mkNeovimPlugin {
name = "git-conflict";
package = "git-conflict-nvim";
description = "A plugin to visualise and resolve merge conflicts in neovim.";
maintainers = [ maintainers.GaetanLepage ];
dependencies = [ "git" ];
imports = [
# TODO: added 2025-04-07, remove after 25.05
(lib.nixvim.mkRemovedPackageOptionModule {
plugin = "git-conflict";
packageName = "git";
})
];
settingsOptions = {
default_mappings =
helpers.defaultNullOpts.mkNullable (with types; either bool (attrsOf str)) true
''
This plugin offers default buffer local mappings inside conflicted files.
This is primarily because applying these mappings only to relevant buffers is impossible
through global mappings.
Set to `false` to disable mappings entirely.
Defaults (if left `true`):
```nix
{
ours = "co";
theirs = "ct";
none = "c0";
both = "cb";
next = "[x";
prev = "]x";
}
```
'';
default_commands = helpers.defaultNullOpts.mkBool true ''
Set to `false` to disable commands created by this plugin.
'';
disable_diagnostics = helpers.defaultNullOpts.mkBool false ''
This will disable the diagnostics in a buffer whilst it is conflicted.
'';
list_opener = helpers.defaultNullOpts.mkStr "copen" ''
Command or function to open the conflicts list.
'';
highlights = {
incoming = helpers.defaultNullOpts.mkStr "DiffAdd" ''
Which highlight group to use for incoming changes.
'';
current = helpers.defaultNullOpts.mkStr "DiffText" ''
Which highlight group to use for current changes.
'';
ancestor = helpers.mkNullOrStr ''
Which highlight group to use for ancestor.
Plugin default: `null`
'';
};
};
settingsExample = {
default_mappings = {
ours = "o";
theirs = "t";
none = "0";
both = "b";
next = "n";
prev = "p";
};
default_commands = true;
disable_diagnostics = false;
list_opener = "copen";
highlights = {
incoming = "DiffAdd";
current = "DiffText";
};
};
}