Skip to content

Commit 014b143

Browse files
committed
tests/modules/performance/combine-plugins: restore test functionality
Replace test plugins to those that reflect the intention for the test.
1 parent faa31d9 commit 014b143

File tree

1 file changed

+25
-26
lines changed

1 file changed

+25
-26
lines changed

tests/test-sources/modules/performance/combine-plugins.nix

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,17 @@ in
6262
{
6363
performance.combinePlugins.enable = true;
6464
extraPlugins = with pkgs.vimPlugins; [
65-
# Depends on nvim-cmp
66-
cmp-dictionary
67-
# Depends on telescope-nvim which itself depends on plenary-nvim
68-
telescope-undo-nvim
65+
# Depends on nui-nvim
66+
noice-nvim
67+
# Depends on null-ls-nvim which itself depends on plenary-nvim
68+
mason-null-ls-nvim
6969
];
7070
extraConfigLuaPost = ''
7171
-- Plugins and its dependencies are loadable
72-
require("cmp_dictionary")
73-
require("cmp")
74-
require("telescope-undo")
75-
require("telescope")
72+
require("noice")
73+
require("nui.popup")
74+
require("mason-null-ls.settings") -- Avoid calling deprecated functions
75+
require("null-ls.helpers") -- Avoid calling deprecated functions
7676
require("plenary")
7777
'';
7878
assertions = [
@@ -155,7 +155,7 @@ in
155155
# Optional plugin with dependency on plenary-nvim
156156
# Dependencies should not be duplicated
157157
{
158-
plugin = telescope-nvim;
158+
plugin = none-ls-nvim;
159159
optional = true;
160160
}
161161
];
@@ -167,16 +167,16 @@ in
167167
-- Opt plugins are not loadable
168168
local ok = pcall(require, "nvim-treesitter")
169169
assert(not ok, "nvim-treesitter plugin is loadable")
170-
ok = pcall(require, "telescope")
171-
assert(not ok, "telescope-nvim plugin is loadable")
170+
ok = pcall(require, "null-ls")
171+
assert(not ok, "null-ls-nvim plugin is loadable")
172172
173173
-- Load plugins
174174
vim.cmd.packadd("nvim-treesitter")
175-
vim.cmd.packadd("telescope.nvim")
175+
vim.cmd.packadd("none-ls.nvim")
176176
177177
-- Now opt plugins are loadable
178178
require("nvim-treesitter")
179-
require("telescope")
179+
require("null-ls")
180180
181181
-- Only one copy of plenary-nvim should be available
182182
assert(
@@ -321,17 +321,17 @@ in
321321
# By package itself
322322
nvim-lspconfig
323323
# Its dependency, plenary-nvim, not in this list, so will be combined
324-
telescope-nvim
324+
none-ls-nvim
325325
# Dependency of other plugin
326-
"nvim-cmp"
326+
"nui.nvim"
327327
];
328328
};
329329
extraPlugins = with pkgs.vimPlugins; [
330330
nvim-treesitter
331331
nvim-lspconfig
332-
telescope-nvim
333-
# Only its dependency (nvim-cmp) won't be combined, but not the plugin itself
334-
cmp-dictionary
332+
none-ls-nvim
333+
# Only its dependency (nui-nvim) won't be combined, but not the plugin itself
334+
noice-nvim
335335
# More plugins
336336
gitsigns-nvim
337337
luasnip
@@ -340,10 +340,10 @@ in
340340
-- Plugins are loadable
341341
require("nvim-treesitter")
342342
require("lspconfig")
343-
require("telescope")
343+
require("null-ls")
344344
require("plenary")
345-
require("cmp_dictionary")
346-
require("cmp")
345+
require("noice")
346+
require("nui.popup")
347347
require("gitsigns")
348348
require("luasnip")
349349
@@ -357,18 +357,17 @@ in
357357
-- Standalone plugins
358358
assert(is_standalone("nvim-treesitter"), "nvim-treesitter is combined, expected standalone")
359359
assert(is_standalone("lspconfig"), "nvim-lspconfig is combined, expected standalone")
360-
assert(is_standalone("telescope"), "telescope-nvim is combined, expected standalone")
361-
-- Add trailing slash to ensure that it doesn't match cmp_dictionary
362-
assert(is_standalone("cmp/", "nvim-cmp"), "nvim-cmp is combined, expected standalone")
360+
assert(is_standalone("null-ls", "none-ls.nvim"), "none-ls-nvim is combined, expected standalone")
361+
assert(is_standalone("nui"), "nui-nvim is combined, expected standalone")
363362
-- Combined plugins
364363
assert(not is_standalone("plenary"), "plenary-nvim is standalone, expected combined")
365-
assert(not is_standalone("cmp_dictionary", "cmp-dictionary"), "cmp-dictionary is standalone, expected combined")
364+
assert(not is_standalone("noice"), "noice-nvim is standalone, expected combined")
366365
assert(not is_standalone("gitsigns"), "gitsigns-nvim is standalone, expected combined")
367366
assert(not is_standalone("luasnip"), "luasnip is standalone, expected combined")
368367
'';
369368
assertions = [
370369
{
371-
# plugin-pack, nvim-treesitter, nvim-lspconfig, telescope-nvim, nvim-cmp
370+
# plugin-pack, nvim-treesitter, nvim-lspconfig, none-ls-nvim, nui-nvim
372371
assertion = pluginCount config.build.nvimPackage config.build.extraFiles "start" == 5;
373372
message = "Wrong number of plugins in packpathDirs";
374373
}

0 commit comments

Comments
 (0)