Unverified Commit 4852029f authored by Matthieu Coudron's avatar Matthieu Coudron Committed by GitHub
Browse files

neovimUtils.makeVimPackageInfo: follow up fixes (#478084)

parents 86a6e0f9 6676eb44
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -68,8 +68,12 @@ let
  */
  makeVimPackageInfo =
    # a list of neovim plugin derivations, for instance
    #  plugins = [
    # { plugin=vimPlugins.far-vim; config = "let g:far#source='rg'"; optional = false; }
    #  [
    #     {
    #       plugin   = vimPlugins.grug-far-nvim;
    #       config   = "let g:grug_far = { 'startInInsertMode': v:false }";
    #       optional = false;
    #     }
    #     vimPlugins.vim-fugitive
    #  ]
    plugins:
@@ -79,7 +83,7 @@ let

      vimPackage = normalizedPluginsToVimPackage pluginsNormalized;

      userPluginLua = lib.foldl (
      userPluginViml = lib.foldl (
        acc: p: if p.config != null then acc ++ [ p.config ] else acc
      ) [ ] pluginsNormalized;

@@ -103,8 +107,8 @@ let
      # plugins' python dependencies
      inherit pluginPython3Packages;

      # lua config set by the user along with the plugin
      inherit userPluginLua;
      # viml config set by the user along with the plugin
      inherit userPluginViml;

      # recommanded configuration set in vim plugins ".passthru.initLua"
      inherit pluginAdvisedLua;
+1 −1
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ let

        # we call vimrcContent without 'packages' to avoid the init.vim generation
        neovimRcContent' = lib.concatStringsSep "\n" (
          vimPackageInfo.userPluginLua ++ lib.optional (neovimRcContent != null) neovimRcContent
          vimPackageInfo.userPluginViml ++ lib.optional (neovimRcContent != null) neovimRcContent
        );

        packpathDirs.myNeovimPackages = vimPackageInfo.vimPackage;