neovim.tests: test lua transitive deps are available
As reported in several issues, lua plugin dependencies are not visible from neovim. This adds a test to make sure nvim can see jsregexp when luasnip is part of the wrapper see https://github.com/NixOS/nixpkgs/issues/306367 or https://github.com/NixOS/nixpkgs/issues/318925 for details
This commit is contained in:
@@ -43,6 +43,14 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
nvim-with-luasnip = wrapNeovim2 "-with-lua-packages" (makeNeovimConfig {
|
||||
plugins = [ {
|
||||
plugin = vimPlugins.luasnip;
|
||||
|
||||
}
|
||||
];
|
||||
});
|
||||
|
||||
nvimAutoDisableWrap = makeNeovimConfig { };
|
||||
|
||||
wrapNeovim2 = suffix: config:
|
||||
@@ -281,4 +289,16 @@ rec {
|
||||
export HOME=$TMPDIR
|
||||
${nvim_with_opt_plugin}/bin/nvim -i NONE +quit! -e
|
||||
'';
|
||||
|
||||
inherit nvim-with-luasnip;
|
||||
|
||||
# check that bringing in one plugin with lua deps makes those deps visible from wrapper
|
||||
# for instance luasnip has a dependency on jsregexp
|
||||
can_require_transitive_deps =
|
||||
runTest nvim-with-luasnip ''
|
||||
export HOME=$TMPDIR
|
||||
cat ${nvim-with-luasnip}/bin/nvim
|
||||
${nvim-with-luasnip}/bin/nvim -i NONE --cmd "lua require'jsregexp'" -e
|
||||
'';
|
||||
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user