mirror of
https://github.com/nix-community/nixvim.git
synced 2025-11-08 11:36:07 +01:00
53 lines
1.2 KiB
Nix
53 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
lib.nixvim.plugins.mkNeovimPlugin {
|
|
name = "gitsigns";
|
|
package = "gitsigns-nvim";
|
|
description = "Git integration for buffers.";
|
|
|
|
maintainers = [ lib.maintainers.GaetanLepage ];
|
|
|
|
imports = [
|
|
# TODO: added 2025-04-06, remove after 25.05
|
|
(lib.nixvim.mkRemovedPackageOptionModule {
|
|
plugin = "gitsigns";
|
|
packageName = "git";
|
|
})
|
|
];
|
|
|
|
dependencies = [ "git" ];
|
|
|
|
settingsOptions = import ./settings-options.nix lib;
|
|
|
|
settingsExample = {
|
|
signs = {
|
|
add.text = "│";
|
|
change.text = "│";
|
|
delete.text = "_";
|
|
topdelete.text = "‾";
|
|
changedelete.text = "~";
|
|
untracked.text = "┆";
|
|
};
|
|
signcolumn = true;
|
|
watch_gitdir.follow_files = true;
|
|
current_line_blame = false;
|
|
current_line_blame_opts = {
|
|
virt_text = true;
|
|
virt_text_pos = "eol";
|
|
};
|
|
};
|
|
|
|
extraConfig = cfg: {
|
|
warnings = lib.nixvim.mkWarnings "plugins.gitsigns" {
|
|
when = ((cfg.settings.trouble or false) == true) && !config.plugins.trouble.enable;
|
|
|
|
message = ''
|
|
You have enabled `plugins.gitsigns.settings.trouble` but `plugins.trouble.enable` is `false`.
|
|
You should maybe enable the `trouble` plugin.
|
|
'';
|
|
};
|
|
};
|
|
}
|