mirror of
https://github.com/nix-community/home-manager
synced 2024-11-01 08:49:44 +01: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;
|
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 {
|
in mkIf cfg.enable {
|
||||||
|
|
||||||
programs.neovim.generatedConfigViml = neovimConfig.neovimRcContent;
|
programs.neovim.generatedConfigViml = neovimConfig.neovimRcContent;
|
||||||
|
@ -422,11 +429,10 @@ in {
|
||||||
# writes runtime
|
# writes runtime
|
||||||
(map (x: x.runtime) pluginsNormalized) ++ [{
|
(map (x: x.runtime) pluginsNormalized) ++ [{
|
||||||
"nvim/init.lua" = let
|
"nvim/init.lua" = let
|
||||||
luaRcContent =
|
luaRcContent = lib.optionalString (wrappedNeovim'.initRc != "")
|
||||||
lib.optionalString (neovimConfig.neovimRcContent != "")
|
|
||||||
"vim.cmd [[source ${
|
"vim.cmd [[source ${
|
||||||
pkgs.writeText "nvim-init-home-manager.vim"
|
pkgs.writeText "nvim-init-home-manager.vim"
|
||||||
neovimConfig.neovimRcContent
|
wrappedNeovim'.initRc
|
||||||
}]]" + config.programs.neovim.extraLuaConfig
|
}]]" + config.programs.neovim.extraLuaConfig
|
||||||
+ lib.optionalString hasLuaConfig
|
+ lib.optionalString hasLuaConfig
|
||||||
config.programs.neovim.generatedConfigs.lua;
|
config.programs.neovim.generatedConfigs.lua;
|
||||||
|
@ -437,13 +443,6 @@ in {
|
||||||
};
|
};
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
programs.neovim.finalPackage = pkgs.wrapNeovimUnstable cfg.package
|
programs.neovim.finalPackage = wrappedNeovim';
|
||||||
(neovimConfig // {
|
|
||||||
wrapperArgs = (lib.escapeShellArgs
|
|
||||||
(neovimConfig.wrapperArgs ++ cfg.extraWrapperArgs)) + " "
|
|
||||||
+ extraMakeWrapperArgs + " " + extraMakeWrapperLuaCArgs + " "
|
|
||||||
+ extraMakeWrapperLuaArgs;
|
|
||||||
wrapRc = false;
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue