Unverified Commit 921bd54d authored by Matthieu Coudron's avatar Matthieu Coudron Committed by GitHub
Browse files

neovim: set provider configuration to initrc (#498687)

parents 151ac5e7 4d7ec078
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -242,6 +242,8 @@
- `openrgb` was updated to 1.0rc2, which now uses Plugin API version 4.
  Some existing OpenRGB plugins may be incompatible or require updates.

- `wrapNeovimUnstable` now sets provider-related configuration in its generated config rather than as wrapper arguments. It should not affect configuration unless you set `wrapRc` to false or are using the `legacyWrapper`.

- We now use the upstream wrapper script for Gradle, supporting both the `JAVA_HOME` and `GRADLE_OPTS` environment variables.

- the `autossh-ng` NixOS module was introduced as a simpler alternative to the existing `autossh` module.
+2 −1
Original line number Diff line number Diff line
@@ -223,7 +223,8 @@ let
      res
      // {
        wrapperArgs = lib.escapeShellArgs res.wrapperArgs + " " + extraMakeWrapperArgs;
        wrapRc = (configure != { });
        wrapRc = configure != { };
        legacyWrapper = true;
      }
    );

+42 −36
Original line number Diff line number Diff line
@@ -105,13 +105,16 @@ let
        packpathDirs.myNeovimPackages = vimPackageInfo.vimPackage;
        finalPackdir = neovimUtils.packDir packpathDirs;

        rcContent = ''
          ${luaRcContent}
        ''
        + lib.optionalString (neovimRcContent' != "") ''
        rcContent = lib.concatStringsSep "\n" (
          [
            providerLuaRc
          ]
          ++ lib.optional (luaRcContent != "") luaRcContent
          ++ lib.optional (neovimRcContent' != "") ''
            vim.cmd.source "${writeText "init.vim" neovimRcContent'}"
          ''
        + lib.optionalString autoconfigure (lib.concatStringsSep "\n" vimPackageInfo.pluginAdvisedLua);
          ++ lib.optionals autoconfigure vimPackageInfo.pluginAdvisedLua
        );

        python3Env =
          lib.warnIf (attrs ? python3Env)
@@ -126,7 +129,10 @@ let

        wrapperArgsStr = if lib.isString wrapperArgs then wrapperArgs else lib.escapeShellArgs wrapperArgs;

        generatedWrapperArgs = [
        generatedWrapperArgs =

          # neovimUtils.legacyWrapper adds a `legacyWrapper` attribute to let us know we run in "legacy" mode
          lib.optionals (attrs ? legacyWrapper) [
            # vim accepts a limited number of commands so we join all the provider ones
            "--add-flags"
            ''--cmd "lua ${providerLuaRc}"''
@@ -201,7 +207,7 @@ let
        ++ lib.optionals finalAttrs.wrapRc [
          "--set-default"
          "VIMINIT"
          "lua dofile('${writeText "init.lua" rcContent}')"
          "lua dofile('${writeText "init.lua" finalAttrs.luaRcContent}')"
        ]
        ++ finalAttrs.generatedWrapperArgs;