mirror of
https://github.com/nix-community/home-manager.git
synced 2024-12-14 11:57:55 +00:00
modules/neovim: fix config generation (#5976)
This commit is contained in:
parent
1e27f213d7
commit
5ec753a1fc
1 changed files with 10 additions and 11 deletions
|
@ -398,6 +398,13 @@ in {
|
|||
customRC = cfg.extraConfig;
|
||||
};
|
||||
|
||||
wrappedNeovim' = pkgs.wrapNeovimUnstable cfg.package (neovimConfig // {
|
||||
wrapperArgs =
|
||||
(lib.escapeShellArgs (neovimConfig.wrapperArgs ++ cfg.extraWrapperArgs))
|
||||
+ " " + extraMakeWrapperArgs + " " + extraMakeWrapperLuaCArgs + " "
|
||||
+ extraMakeWrapperLuaArgs;
|
||||
wrapRc = false;
|
||||
});
|
||||
in mkIf cfg.enable {
|
||||
|
||||
programs.neovim.generatedConfigViml = neovimConfig.neovimRcContent;
|
||||
|
@ -422,11 +429,10 @@ in {
|
|||
# writes runtime
|
||||
(map (x: x.runtime) pluginsNormalized) ++ [{
|
||||
"nvim/init.lua" = let
|
||||
luaRcContent =
|
||||
lib.optionalString (neovimConfig.neovimRcContent != "")
|
||||
luaRcContent = lib.optionalString (wrappedNeovim'.initRc != "")
|
||||
"vim.cmd [[source ${
|
||||
pkgs.writeText "nvim-init-home-manager.vim"
|
||||
neovimConfig.neovimRcContent
|
||||
wrappedNeovim'.initRc
|
||||
}]]" + config.programs.neovim.extraLuaConfig
|
||||
+ lib.optionalString hasLuaConfig
|
||||
config.programs.neovim.generatedConfigs.lua;
|
||||
|
@ -437,13 +443,6 @@ in {
|
|||
};
|
||||
}]);
|
||||
|
||||
programs.neovim.finalPackage = pkgs.wrapNeovimUnstable cfg.package
|
||||
(neovimConfig // {
|
||||
wrapperArgs = (lib.escapeShellArgs
|
||||
(neovimConfig.wrapperArgs ++ cfg.extraWrapperArgs)) + " "
|
||||
+ extraMakeWrapperArgs + " " + extraMakeWrapperLuaCArgs + " "
|
||||
+ extraMakeWrapperLuaArgs;
|
||||
wrapRc = false;
|
||||
});
|
||||
programs.neovim.finalPackage = wrappedNeovim';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue