neovim: handle plugins without pname

This commit is contained in:
Austin Horstman
2026-04-23 23:35:40 -05:00
parent c7770b178a
commit c552f3dd37
2 changed files with 14 additions and 1 deletions
@@ -247,6 +247,15 @@ pkgs.lib.recurseIntoAttrs rec {
};
};
nvim_with_no_pname_plugin = neovim.override {
extraName = "-with-no-pname-plugin";
configure.packages.plugins = {
start = [
vimPlugins.corePlugins
];
};
};
# regression test that ftplugin files from plugins are loaded before the ftplugin
# files from $VIMRUNTIME
run_nvim_with_ftplugin = runTest nvim_with_ftplugin ''
@@ -260,6 +269,10 @@ pkgs.lib.recurseIntoAttrs rec {
[ "$result" = 0 ]
'';
run_nvim_with_no_pname_plugin = runTest nvim_with_no_pname_plugin ''
${nvim_with_no_pname_plugin}/bin/nvim -i NONE -e --headless +quit
'';
# Generate a neovim wrapper with only a init.lua and no init.vim file
nvim_with_only_init_lua = wrapNeovim2 "-only-lua-init-file" {
luaRcContent = "-- some text";
@@ -218,7 +218,7 @@ let
paths = allGrammars;
};
allAndOptPluginNames = map (plugin: plugin.pname) (allPlugins ++ opt);
allAndOptPluginNames = map (plugin: plugin.pname or null) (allPlugins ++ opt);
packdirStart = vimFarm "pack/${packageName}/start" "packdir-start" (
if allGrammars != [ ] then allPlugins ++ [ allGrammarsSymlinked ] else allPlugins