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

neovim: check for pnames when asserting if two treesitters are installed (#512097)

parents 39d8b921 1a9bbc06
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -218,6 +218,8 @@ let
            paths = allGrammars;
          };

          allAndOptPluginNames = map (plugin: plugin.pname) (allPlugins ++ opt);

          packdirStart = vimFarm "pack/${packageName}/start" "packdir-start" (
            if allGrammars != [ ] then allPlugins ++ [ allGrammarsSymlinked ] else allPlugins
          );
@@ -234,8 +236,8 @@ let

        assert
          (
            builtins.elem vimPlugins.nvim-treesitter (opt ++ allPlugins)
            && builtins.elem vimPlugins.nvim-treesitter-legacy (opt ++ allPlugins)
            builtins.elem "nvim-treesitter" allAndOptPluginNames
            && builtins.elem "nvim-treesitter-legacy" allAndOptPluginNames
          )
          -> throw "You cannot include two different versions of nvim-treesitter, perhaps you included a legacy plugin together with a new one?";