From f8c412ba7f7ddfeb48f72507c6fb2ae44f11e105 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Mon, 17 Apr 2023 16:39:54 +0100 Subject: [PATCH] plugins/conjure: init plugin (#339) * plugins/conjure: init plugin * conjure: fix import --- plugins/default.nix | 1 + plugins/utils/conjure.nix | 20 ++++++++++++++++++++ tests/test-sources/plugins/utils/conjure.nix | 5 +++++ 3 files changed, 26 insertions(+) create mode 100644 plugins/utils/conjure.nix create mode 100644 tests/test-sources/plugins/utils/conjure.nix diff --git a/plugins/default.nix b/plugins/default.nix index 7a78ef03..ef4988f0 100644 --- a/plugins/default.nix +++ b/plugins/default.nix @@ -68,6 +68,7 @@ ./utils/comment-nvim.nix ./utils/commentary.nix + ./utils/conjure.nix ./utils/easyescape.nix ./utils/endwise.nix ./utils/floaterm.nix diff --git a/plugins/utils/conjure.nix b/plugins/utils/conjure.nix new file mode 100644 index 00000000..6f6f86a8 --- /dev/null +++ b/plugins/utils/conjure.nix @@ -0,0 +1,20 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; let + cfg = config.plugins.conjure; + helpers = import ../helpers.nix {inherit lib;}; +in { + options.plugins.conjure = { + enable = mkEnableOption "Conjure"; + + package = helpers.mkPackageOption "conjure" pkgs.vimPlugins.conjure; + }; + + config = mkIf cfg.enable { + extraPlugins = [cfg.package]; + }; +} diff --git a/tests/test-sources/plugins/utils/conjure.nix b/tests/test-sources/plugins/utils/conjure.nix new file mode 100644 index 00000000..968d3588 --- /dev/null +++ b/tests/test-sources/plugins/utils/conjure.nix @@ -0,0 +1,5 @@ +{ + empty = { + plugins.conjure.enable = true; + }; +}