mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 21:30:51 +00:00
improve helper functions
This commit is contained in:
parent
78c01d50ed
commit
1c0b31cc10
1 changed files with 4 additions and 13 deletions
|
@ -127,20 +127,11 @@ inputs: {
|
||||||
inherit extraLuaPackages extraPython3Packages;
|
inherit extraLuaPackages extraPython3Packages;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dummyInit = pkgs.writeText "nvf-init.lua" vimOptions.builtLuaConfigRC;
|
||||||
# Additional helper scripts for printing and displaying nvf configuration
|
# Additional helper scripts for printing and displaying nvf configuration
|
||||||
# in your commandline.
|
# in your commandline.
|
||||||
printConfig = pkgs.writers.writeDashBin "nvf-print-config" ''
|
printConfig = pkgs.writers.writeDashBin "nvf-print-config" "cat ${dummyInit}";
|
||||||
cat << EOF
|
printConfigPath = pkgs.writers.writeDashBin "nvf-print-config-path" "echo -n ${dummyInit}";
|
||||||
${vimOptions.builtLuaConfigRC}
|
|
||||||
EOF
|
|
||||||
'';
|
|
||||||
|
|
||||||
printConfigPath = pkgs.writers.writeDashBin "nvf-print-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;
|
||||||
|
@ -150,7 +141,7 @@ in {
|
||||||
neovim = pkgs.symlinkJoin {
|
neovim = pkgs.symlinkJoin {
|
||||||
name = "nvf-with-helpers";
|
name = "nvf-with-helpers";
|
||||||
paths = [neovim-wrapped printConfig printConfigPath];
|
paths = [neovim-wrapped printConfig printConfigPath];
|
||||||
postBuild = "echo helpers added";
|
postBuild = "echo Helpers added";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Wrapped version of Neovim with additional helper scripts";
|
description = "Wrapped version of Neovim with additional helper scripts";
|
||||||
|
|
Loading…
Reference in a new issue