neovim: add missing bit for extraLuaPackages
turns out I forgot to remove the now unnecessary wrapper arguments in https://github.com/nix-community/home-manager/pull/8606. This meant that `xdg.configFile."nvim/init.lua".enable = false` was enough to fix the user issues but this should not be the case anymore.
This commit is contained in:
parent
2a08ab21ab
commit
5786e42530
2 changed files with 22 additions and 17 deletions
21
modules/misc/news/2026/01/2026-01-25_19-00-28.nix
Normal file
21
modules/misc/news/2026/01/2026-01-25_19-00-28.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
time = "2026-01-25T18:00:28+00:00";
|
||||
condition = config.programs.neovim.enable;
|
||||
message = ''
|
||||
The neovim module now exposes programs.neovim.extraLuaPackages via init.lua instead of wrapper arguments.
|
||||
This makes for a better out of the box experience, closer to what users can expect on other distributions, i.e., you
|
||||
can now run any neovim derivatives (neovide, neovim-qt etc) without wrapping.
|
||||
|
||||
If you used home-manager only to install plugins, the newly generated init.lua might conflict with yours.
|
||||
You can ignore the generated init.lua with
|
||||
`xdg.configFile."nvim/init.lua".enable = false` but `extraLuaPackages` will become ineffective.
|
||||
You can still refer to its generated content via:
|
||||
xdg.configFile."nvim/lua/hm-generated.lua".text = config.programs.neovim.initLua;
|
||||
and in your manual init.lua `require'hm-generated'`
|
||||
|
||||
For more details, see:
|
||||
- https://github.com/nix-community/home-manager/pull/8586
|
||||
- https://github.com/nix-community/home-manager/pull/8606 and its linked comments for more details/solutions.
|
||||
'';
|
||||
}
|
||||
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
let
|
||||
inherit (lib)
|
||||
concatMapStringsSep
|
||||
literalExpression
|
||||
mkEnableOption
|
||||
mkIf
|
||||
|
|
@ -428,20 +427,6 @@ in
|
|||
(lib.makeBinPath cfg.extraPackages)
|
||||
];
|
||||
|
||||
extraMakeWrapperLuaCArgs = optionals (resolvedExtraLuaPackages != [ ]) [
|
||||
"--suffix"
|
||||
"LUA_CPATH"
|
||||
";"
|
||||
(concatMapStringsSep ";" luaPackages.getLuaCPath resolvedExtraLuaPackages)
|
||||
];
|
||||
|
||||
extraMakeWrapperLuaArgs = optionals (resolvedExtraLuaPackages != [ ]) [
|
||||
"--suffix"
|
||||
"LUA_PATH"
|
||||
";"
|
||||
(concatMapStringsSep ";" luaPackages.getLuaPath resolvedExtraLuaPackages)
|
||||
];
|
||||
|
||||
vimPackageInfo = neovimUtils.makeVimPackageInfo (map suppressNotVimlConfig pluginsNormalized);
|
||||
|
||||
wrappedNeovim' = pkgs.wrapNeovimUnstable cfg.package {
|
||||
|
|
@ -462,8 +447,7 @@ in
|
|||
extraPython3Packages =
|
||||
ps: (cfg.extraPython3Packages ps) ++ (lib.concatMap (f: f ps) vimPackageInfo.pluginPython3Packages);
|
||||
neovimRcContent = cfg.extraConfig;
|
||||
wrapperArgs =
|
||||
cfg.extraWrapperArgs ++ extraMakeWrapperArgs ++ extraMakeWrapperLuaCArgs ++ extraMakeWrapperLuaArgs;
|
||||
wrapperArgs = cfg.extraWrapperArgs ++ extraMakeWrapperArgs;
|
||||
wrapRc = false;
|
||||
};
|
||||
in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue