2023-02-20 11:42:13 +01:00
|
|
|
{
|
|
|
|
lib,
|
2023-11-06 15:04:08 +01:00
|
|
|
config,
|
2023-02-20 11:42:13 +01:00
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
2025-04-03 18:54:15 +02:00
|
|
|
inherit (lib) mkEnableOption;
|
2023-02-20 11:42:13 +01:00
|
|
|
in
|
2025-04-03 18:54:15 +02:00
|
|
|
lib.nixvim.plugins.mkNeovimPlugin {
|
|
|
|
name = "harpoon";
|
|
|
|
package = "harpoon2";
|
2025-06-18 02:42:47 +03:00
|
|
|
description = "Quickly access files and marks in Neovim.";
|
2023-02-26 19:50:51 +01:00
|
|
|
|
2025-04-03 18:54:15 +02:00
|
|
|
maintainers = [ lib.maintainers.GaetanLepage ];
|
2023-02-26 19:50:51 +01:00
|
|
|
|
2025-04-03 18:54:15 +02:00
|
|
|
setup = ":setup";
|
2023-02-26 19:50:51 +01:00
|
|
|
|
2025-04-03 18:54:15 +02:00
|
|
|
# TODO: introduced 2025-04-03: remove after 25.11
|
|
|
|
imports = [
|
|
|
|
./deprecations.nix
|
|
|
|
];
|
2023-02-14 20:46:44 +01:00
|
|
|
|
2025-04-03 18:54:15 +02:00
|
|
|
extraOptions = {
|
|
|
|
enableTelescope = mkEnableOption "telescope integration";
|
|
|
|
};
|
2023-02-14 20:46:44 +01:00
|
|
|
|
2025-04-03 18:54:15 +02:00
|
|
|
settingsExample = {
|
|
|
|
settings = {
|
|
|
|
save_on_toggle = true;
|
|
|
|
sync_on_ui_close = false;
|
2024-05-05 19:39:35 +02:00
|
|
|
};
|
2025-04-03 18:54:15 +02:00
|
|
|
};
|
2023-02-14 20:46:44 +01:00
|
|
|
|
2025-04-03 18:54:15 +02:00
|
|
|
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.";
|
2023-03-21 22:19:07 +01:00
|
|
|
};
|
|
|
|
|
2025-04-03 18:54:15 +02:00
|
|
|
plugins.telescope.enabledExtensions = lib.mkIf cfg.enableTelescope [ "harpoon" ];
|
2024-05-05 19:39:35 +02:00
|
|
|
};
|
2023-02-14 20:46:44 +01:00
|
|
|
}
|