diff --git a/pkgs/applications/editors/neovim/tests/default.nix b/pkgs/applications/editors/neovim/tests/default.nix index e4c429c759c2..c7d3bbb29d06 100644 --- a/pkgs/applications/editors/neovim/tests/default.nix +++ b/pkgs/applications/editors/neovim/tests/default.nix @@ -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"; diff --git a/pkgs/applications/editors/vim/plugins/utils/vim-utils.nix b/pkgs/applications/editors/vim/plugins/utils/vim-utils.nix index ccc1f058105e..5f0290699007 100644 --- a/pkgs/applications/editors/vim/plugins/utils/vim-utils.nix +++ b/pkgs/applications/editors/vim/plugins/utils/vim-utils.nix @@ -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