Unverified Commit b5162ed3 authored by Austin Horstman's avatar Austin Horstman Committed by GitHub
Browse files

neovim: handle plugins without pname (#512989)

parents 731c113f c552f3dd
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -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";
+1 −1
Original line number Diff line number Diff line
@@ -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