git.iko.soy/typeable/nixpkgs
on master help sign in
neovim: fix neovim.override (#124785)

* neovim: temporary revert to unbreak user configs Newly introduced "plugins" parameter is disabled until we get a better testing infrastructure to minimize breaking changes.

commitc73371e04b97493a34ac24ca09abc6a726d07697 authorMatthieu Coudron <teto@users.noreply.github.com> dateSat 29 May 2021, 16:36 (5 years ago) parent759e95d
2 files changed+12−14
pkgs/applications/editors/neovim/utils.nix+3−14 pkgs/test/vim/default.nix+9
pkgs/applications/editors/neovim/utils.nix+3−14
@@ -54,15 +54,7 @@ let
5454
5555
5656 configurePatched = configure // {
57− packages.nix = {
58− start = lib.filter (f: f != null)
59− (map (x: if x.optional == false then x.plugin else null)
60− pluginsNormalized);
61− opt = lib.filter (f: f != null)
62− (map (x: if x.optional == true then x.plugin else null)
63− pluginsNormalized);
64− };
65− customRC = pluginRc + customRC;
57+ customRC = pluginRc + customRC + (configure.customRC or "");
6658 };
6759
6860 # A function to get the configuration string (if any) from an element of 'plugins'
@@ -173,11 +165,8 @@ let
173165 assert withPython -> throw "Python2 support has been removed from neovim, please remove withPython and extraPythonPackages.";
174166
175167 wrapNeovimUnstable neovim (res // {
176− wrapperArgs = lib.escapeShellArgs (
177− res.wrapperArgs ++ lib.optionals (configure != {}) [
178− "--add-flags" "-u ${writeText "init.vim" res.neovimRcContent}"
179− ]) + " " + extraMakeWrapperArgs
180− ;
168+ wrapperArgs = lib.escapeShellArgs res.wrapperArgs + extraMakeWrapperArgs;
169+ wrapRc = (configure != {});
181170 });
182171in
183172{
pkgs/test/vim/default.nix+9
@@ -36,6 +36,15 @@ in
3636 ##################
3737 nvim_with_plugins = wrapNeovim "-with-plugins" nvimConfNix;
3838
39+ nvim_via_override = neovim.override {
40+ configure = {
41+ packages.foo.start = [ vimPlugins.ale ];
42+ customRC = ''
43+ :help ale
44+ '';
45+ };
46+ };
47+
3948 ### vim tests
4049 ##################
4150 vim_with_vim2nix = vim_configurable.customize {