mirror of
https://github.com/nix-community/home-manager
synced 2024-06-01 04:23:34 +02:00
neovim: add extraWrapperArgs option
pass external arguments to neovim-unwrapper this gives users more flexibility in managing neovim configuration
This commit is contained in:
parent
80546b220e
commit
6aed4bbf55
|
@ -198,6 +198,28 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
extraWrapperArgs = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [ ];
|
||||
example = literalExpression ''
|
||||
[
|
||||
"--suffix"
|
||||
"LIBRARY_PATH"
|
||||
":"
|
||||
"''${lib.makeLibraryPath [ pkgs.stdenv.cc.cc pkgs.zlib ]}"
|
||||
"--suffix"
|
||||
"PKG_CONFIG_PATH"
|
||||
":"
|
||||
"''${lib.makeSearchPathOutput "dev" "lib/pkgconfig" [ pkgs.stdenv.cc.cc pkgs.zlib ]}"
|
||||
]
|
||||
'';
|
||||
description = ''
|
||||
Extra arguments to be passed to the neovim wrapper.
|
||||
This option sets environment variables required for building and running binaries
|
||||
with external package managers like mason.nvim.
|
||||
'';
|
||||
};
|
||||
|
||||
generatedConfigViml = mkOption {
|
||||
type = types.lines;
|
||||
visible = true;
|
||||
|
@ -415,7 +437,8 @@ in {
|
|||
|
||||
programs.neovim.finalPackage = pkgs.wrapNeovimUnstable cfg.package
|
||||
(neovimConfig // {
|
||||
wrapperArgs = (lib.escapeShellArgs neovimConfig.wrapperArgs) + " "
|
||||
wrapperArgs = (lib.escapeShellArgs
|
||||
(neovimConfig.wrapperArgs ++ cfg.extraWrapperArgs)) + " "
|
||||
+ extraMakeWrapperArgs + " " + extraMakeWrapperLuaCArgs + " "
|
||||
+ extraMakeWrapperLuaArgs;
|
||||
wrapRc = false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user