1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-08 11:36:07 +01:00
nixvim/plugins/by-name/gitsigns/default.nix
saygo-png 4668857405 plugins/gitsigns: remove settings declarations
Signed-off-by: saygo-png <saygo.mail@proton.me>
2025-11-02 00:01:50 +00:00

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.
'';
};
};
}