diff options
author | Matthieu Coudron <mattator@gmail.com> | 2020-10-20 12:26:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-20 12:26:39 +0200 |
commit | 4c4c4874c49a47a40df6bc45e20124535253f36f (patch) | |
tree | 37e65c85e93d656361f84f7b46272f1b75c944a2 /pkgs/misc/vim-plugins/vim-utils.nix | |
parent | a2ee5cbb0513ee0623bc93aa1af74f172080ce6b (diff) | |
download | nixpkgs-4c4c4874c49a47a40df6bc45e20124535253f36f.tar nixpkgs-4c4c4874c49a47a40df6bc45e20124535253f36f.tar.gz nixpkgs-4c4c4874c49a47a40df6bc45e20124535253f36f.tar.bz2 nixpkgs-4c4c4874c49a47a40df6bc45e20124535253f36f.tar.lz nixpkgs-4c4c4874c49a47a40df6bc45e20124535253f36f.tar.xz nixpkgs-4c4c4874c49a47a40df6bc45e20124535253f36f.tar.zst nixpkgs-4c4c4874c49a47a40df6bc45e20124535253f36f.zip |
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/misc/vim-plugins/vim-utils.nix')
-rw-r--r-- | pkgs/misc/vim-plugins/vim-utils.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/misc/vim-plugins/vim-utils.nix b/pkgs/misc/vim-plugins/vim-utils.nix index 5e1703c8cc3..ee77599a3ba 100644 --- a/pkgs/misc/vim-plugins/vim-utils.nix +++ b/pkgs/misc/vim-plugins/vim-utils.nix @@ -183,7 +183,7 @@ let rtpPath = "share/vim-plugins"; - vimrcFile = { + vimrcContent = { packages ? null, vam ? null, pathogen ? null, @@ -338,7 +338,7 @@ let filetype indent plugin on | syn on ''); - in writeText "vimrc" '' + in '' " configuration generated by NIX set nocompatible @@ -351,11 +351,13 @@ let ${customRC} ''; + vimrcFile = settings: writeText "vimrc" (vimrcContent settings); in rec { inherit vimrcFile; + inherit vimrcContent; # shell script with custom name passing [-u vimrc] [-U gvimrc] to vim vimWithRC = { |