From 30dd9054e1cb3486581f7bbfb6a5dc3277330360 Mon Sep 17 00:00:00 2001 From: Alexander Nortung Date: Tue, 17 Jan 2023 23:24:48 +0100 Subject: [PATCH] nvim-autopairs: package option --- plugins/utils/nvim-autopairs.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/utils/nvim-autopairs.nix b/plugins/utils/nvim-autopairs.nix index 391e230d..e37503e2 100644 --- a/plugins/utils/nvim-autopairs.nix +++ b/plugins/utils/nvim-autopairs.nix @@ -8,6 +8,12 @@ in options.plugins.nvim-autopairs = { enable = mkEnableOption "Enable nvim-autopairs"; + package = mkOption { + type = types.package; + default = pkgs.vimPlugins.nvim-autopairs; + description = "Plugin to use for nvim-autopairs"; + }; + pairs = mkOption { type = types.nullOr (types.attrsOf types.str); default = null; @@ -50,7 +56,7 @@ in }; in mkIf cfg.enable { - extraPlugins = [ pkgs.vimPlugins.nvim-autopairs ]; + extraPlugins = [ cfg.package ]; extraConfigLua = '' require('nvim-autopairs').setup(${helpers.toLuaObject options})