Skip to content

Commit

Permalink
plugins/telescope: add compatibility with combinePlugins
Browse files Browse the repository at this point in the history
  • Loading branch information
stasjok authored and traxys committed Jul 24, 2024
1 parent 5c75cfa commit 532b004
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/telescope/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
15 changes: 15 additions & 0 deletions tests/test-sources/plugins/telescope/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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")
'';
};
}

0 comments on commit 532b004

Please sign in to comment.