From f8c7b7c88d7d2c7e39ced645bfbb87430a21d61d Mon Sep 17 00:00:00 2001 From: Stanislav Asunkin <1353637+stasjok@users.noreply.github.com> Date: Tue, 16 Jul 2024 13:25:15 +0300 Subject: [PATCH] plugins/telescope: add compatibility with `combinePlugins` --- plugins/telescope/default.nix | 3 +++ tests/test-sources/plugins/telescope/default.nix | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/plugins/telescope/default.nix b/plugins/telescope/default.nix index f0322c6340..706a9320b0 100644 --- a/plugins/telescope/default.nix +++ b/plugins/telescope/default.nix @@ -112,6 +112,9 @@ helpers.neovim-plugin.mkNeovimPlugin config { require('telescope').load_extension(extension) end ''; + + # planets picker requires files in data/memes/planets + performance.combinePlugins.pathsToLink = [ "/data/memes/planets" ]; }; settingsOptions = { diff --git a/tests/test-sources/plugins/telescope/default.nix b/tests/test-sources/plugins/telescope/default.nix index 8354ea174f..15d2760795 100644 --- a/tests/test-sources/plugins/telescope/default.nix +++ b/tests/test-sources/plugins/telescope/default.nix @@ -17,4 +17,19 @@ highlightTheme = "gruvbox"; }; }; + + combine-plugins.module = + { config, ... }: + { + plugins.telescope.enable = true; + + performance.combinePlugins.enable = true; + + extraConfigLuaPost = # lua + '' + -- I don't know how run telescope properly in test environment, + -- so just check that files exist + assert(vim.api.nvim_get_runtime_file("data/memes/planets/earth", false)[1], "telescope planets aren't found in runtime") + ''; + }; }