Commit 2473b446 authored by Matthieu Coudron's avatar Matthieu Coudron Committed by Matthieu Coudron
Browse files

neovim: add perl to supported providers

false by default.
I noticed checkhealth complaining about it

Which made me realize the providers ignored user config and were always
using default config, hence the backport.
parent 1348fc1c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -175,6 +175,8 @@ let
      withPython3 ? true
    , withNodeJs ? false
    , withRuby ? true
    # perl is problematic https://github.com/NixOS/nixpkgs/issues/132368
    , withPerl ? false

    # so that we can pass the full neovim config while ignoring it
    , ...
@@ -184,6 +186,7 @@ let
        python = false;
        python3 = withPython3;
        ruby = withRuby;
        perl = withPerl;
      };

      genProviderCommand = prog: withProg:
+10 −3
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
, callPackage
, neovimUtils
, vimUtils
, perl
}:
neovim:

@@ -19,6 +20,7 @@ let
    , withPython2 ? false
    , withPython3 ? true,  python3Env ? python3
    , withNodeJs ? false
    , withPerl ? false
    , rubyEnv ? null
    , vimAlias ? false
    , viAlias ? false
@@ -32,7 +34,7 @@ let
    # entry to load in packpath
    , packpathDirs
    , ...
  }@args:
  }:
  let

    wrapperArgsStr = if lib.isString wrapperArgs then wrapperArgs else lib.escapeShellArgs wrapperArgs;
@@ -50,8 +52,10 @@ let
          ]
          ;

    providerLuaRc = neovimUtils.generateProviderRc args;
    # providerLuaRc = "toto";
    providerLuaRc = neovimUtils.generateProviderRc {
      inherit withPython3 withNodeJs withPerl;
      withRuby = rubyEnv != null;
    };

    # If configure != {}, we can't generate the rplugin.vim file with e.g
    # NVIM_SYSTEM_RPLUGIN_MANIFEST *and* NVIM_RPLUGIN_MANIFEST env vars set in
@@ -86,6 +90,9 @@ let
      + lib.optionalString withNodeJs ''
        ln -s ${nodePackages.neovim}/bin/neovim-node-host $out/bin/nvim-node
      ''
      + lib.optionalString withPerl ''
        ln -s ${perl}/bin/perl $out/bin/nvim-perl
      ''
      + lib.optionalString vimAlias ''
        ln -s $out/bin/nvim $out/bin/vim
      ''