nix-community.nixvim/plugins/by-name/harpoon/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

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" ];
};
}