summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/editors/neovim
diff options
context:
space:
mode:
authorMatthieu Coudron <mattator@gmail.com>2020-10-20 12:26:39 +0200
committerGitHub <noreply@github.com>2020-10-20 12:26:39 +0200
commit4c4c4874c49a47a40df6bc45e20124535253f36f (patch)
tree37e65c85e93d656361f84f7b46272f1b75c944a2 /pkgs/applications/editors/neovim
parenta2ee5cbb0513ee0623bc93aa1af74f172080ce6b (diff)
neovim: add config to passthru (#101100)
first will register the config under the name init.vim which is more appropriate for neovim. Pass the generated config to passthru so that one can easily pass the current config to a raw/unwrapped neovim (helps with development). For instance, home-manager can reference the config in $XDG_CONFIG_HOME/nvim/init.vim without the need to wrap nvim with its config.
Diffstat (limited to 'pkgs/applications/editors/neovim')
-rw-r--r--pkgs/applications/editors/neovim/wrapper.nix9
1 files changed, 5 insertions, 4 deletions
diff --git a/pkgs/applications/editors/neovim/wrapper.nix b/pkgs/applications/editors/neovim/wrapper.nix
index e3c03c92e58c..cdc9a441dc5d 100644
--- a/pkgs/applications/editors/neovim/wrapper.nix
+++ b/pkgs/applications/editors/neovim/wrapper.nix
@@ -1,5 +1,6 @@
{ stdenv, symlinkJoin, lib, makeWrapper
, vimUtils
+, writeText
, bundlerEnv, ruby
, nodejs
, nodePackages
@@ -110,9 +111,9 @@ let
# https://github.com/neovim/neovim/issues/9413
++ lib.optionals (configure != {}) [
"--set" "NVIM_SYSTEM_RPLUGIN_MANIFEST" "${placeholder "out"}/rplugin.vim"
- "--add-flags" "-u ${vimUtils.vimrcFile configure}"
- ]
- ;
+ "--add-flags" "-u ${configFile}"
+ ];
+ configFile = writeText "init.vim" "${vimUtils.vimrcContent configure}";
in
symlinkJoin {
name = "neovim-${stdenv.lib.getVersion neovim}";
@@ -181,7 +182,7 @@ let
preferLocalBuild = true;
buildInputs = [makeWrapper];
- passthru = { unwrapped = neovim; };
+ passthru = { unwrapped = neovim; inherit configFile; };
meta = neovim.meta // {
# To prevent builds on hydra