1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-16 15:32:48 +01:00
nixvim/plugins/by-name/harpoon/default.nix
saygo-png c4b27080a6 treewide: infer packPathName menial work
Signed-off-by: saygo-png <saygo.mail@proton.me>
2025-09-27 23:49:59 +00:00

42 lines
929 B
Nix

{
lib,
config,
...
}:
let
inherit (lib) mkEnableOption;
in
lib.nixvim.plugins.mkNeovimPlugin {
name = "harpoon";
package = "harpoon2";
description = "Quickly access files and marks in Neovim.";
maintainers = [ lib.maintainers.GaetanLepage ];
setup = ":setup";
# TODO: introduced 2025-04-03: remove after 25.11
imports = [
./deprecations.nix
];
extraOptions = {
enableTelescope = mkEnableOption "telescope integration";
};
settingsExample = {
settings = {
save_on_toggle = true;
sync_on_ui_close = false;
};
};
extraConfig = cfg: {
assertions = lib.nixvim.mkAssertions "plugins.harpoon" {
assertion = cfg.enableTelescope -> config.plugins.telescope.enable;
message = "The harpoon telescope integration needs telescope to function as intended.";
};
plugins.telescope.enabledExtensions = lib.mkIf cfg.enableTelescope [ "harpoon" ];
};
}