From cb7212604421650e2a5b0483d12e9e991414ad7b Mon Sep 17 00:00:00 2001 From: Stanislav Asunkin <1353637+stasjok@users.noreply.github.com> Date: Tue, 16 Jul 2024 15:10:23 +0300 Subject: [PATCH] plugins/fugitive: add compatibility with combinePlugins and mini.nvim --- plugins/git/fugitive.nix | 7 +++++++ tests/test-sources/plugins/git/fugitive.nix | 15 +++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 tests/test-sources/plugins/git/fugitive.nix diff --git a/plugins/git/fugitive.nix b/plugins/git/fugitive.nix index a68ce3495b..07e4d9b2ad 100644 --- a/plugins/git/fugitive.nix +++ b/plugins/git/fugitive.nix @@ -13,5 +13,12 @@ helpers.vim-plugin.mkVimPlugin config { maintainers = [ lib.maintainers.GaetanLepage ]; + extraConfig = cfg: { + # mini.nvim and fugitive have duplicate doc tags + performance.combinePlugins.standalonePlugins = lib.mkIf ( + config.performance.combinePlugins.enable && config.plugins.mini.enable + ) [ cfg.package ]; + }; + # In typical tpope fashion, this plugin has no config options } diff --git a/tests/test-sources/plugins/git/fugitive.nix b/tests/test-sources/plugins/git/fugitive.nix new file mode 100644 index 0000000000..de38e7d86e --- /dev/null +++ b/tests/test-sources/plugins/git/fugitive.nix @@ -0,0 +1,15 @@ +{ + empty = { + plugins.fugitive.enable = true; + }; + + # combinePlugins when both mini.nvim and fugitive.vim are installed + combine-plugins = { + plugins = { + fugitive.enable = true; + mini.enable = true; + }; + + performance.combinePlugins.enable = true; + }; +}