mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-12-18 18:01:17 +00:00
modules: add helpers to display init.lua and its store path
This commit is contained in:
parent
f9789432f9
commit
8e6fe1873e
1 changed files with 22 additions and 2 deletions
|
|
@ -105,10 +105,30 @@ inputs: {
|
||||||
inherit (vimOptions) viAlias vimAlias withRuby withNodeJs withPython3;
|
inherit (vimOptions) viAlias vimAlias withRuby withNodeJs withPython3;
|
||||||
inherit extraLuaPackages extraPython3Packages;
|
inherit extraLuaPackages extraPython3Packages;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Additional helper scripts for printing and displaying nvf configuration
|
||||||
|
# in your commandline.
|
||||||
|
printConfig = pkgs.writeShellScriptBin "print-nvf-config" ''
|
||||||
|
cat << EOF
|
||||||
|
${vimOptions.builtLuaConfigRC}
|
||||||
|
EOF
|
||||||
|
'';
|
||||||
|
|
||||||
|
printConfigPath = pkgs.writeShellScriptBin "print-nvf-config-path" ''
|
||||||
|
realpath ${pkgs.writeTextFile {
|
||||||
|
name = "nvf-init.lua";
|
||||||
|
text = vimOptions.builtLuaConfigRC;
|
||||||
|
}}
|
||||||
|
'';
|
||||||
in {
|
in {
|
||||||
inherit (module) options config;
|
inherit (module) options config;
|
||||||
inherit (module._module.args) pkgs;
|
inherit (module._module.args) pkgs;
|
||||||
|
|
||||||
# expose wrapped neovim-package
|
# Expose wrapped neovim-package for userspace
|
||||||
neovim = neovim-wrapped;
|
# or module consumption.
|
||||||
|
neovim = pkgs.symlinkJoin {
|
||||||
|
name = "nvf-with-helpers";
|
||||||
|
paths = [neovim-wrapped printConfig printConfigPath];
|
||||||
|
postBuild = "echo helpers added";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue