From 00d4ca89e034d4c9c350b8b403a62b3e3a678541 Mon Sep 17 00:00:00 2001 From: Alexander Nortung Date: Tue, 17 Jan 2023 22:59:57 +0100 Subject: [PATCH] comment-nvim: package option --- plugins/utils/comment-nvim.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/utils/comment-nvim.nix b/plugins/utils/comment-nvim.nix index 8fd3d930..f7c823ed 100644 --- a/plugins/utils/comment-nvim.nix +++ b/plugins/utils/comment-nvim.nix @@ -8,6 +8,13 @@ in options = { plugins.comment-nvim = { enable = mkEnableOption "Enable comment-nvim"; + + package = mkOption { + type = types.package; + default = pkgs.vimPlugins.comment-nvim; + description = "Plugin to use for comment-nvim"; + }; + padding = mkOption { type = types.nullOr types.bool; description = "Add a space b/w comment and the line"; @@ -97,7 +104,7 @@ in }; in mkIf cfg.enable { - extraPlugins = [ pkgs.vimPlugins.comment-nvim ]; + extraPlugins = [ cfg.package ]; extraConfigLua = ''require("Comment").setup${helpers.toLuaObject setupOptions}''; };