From 474478c4a39fd68282fad3564707bb6a32a42482 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Wed, 31 Jan 2018 17:14:01 +0900 Subject: [PATCH] neovim: add 'configure' flag so that we have the same options as in nixpkgs. (cherry picked from commit be60600a477bec543e6f904431eca22b8af64fec) --- modules/programs/neovim.nix | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/modules/programs/neovim.nix b/modules/programs/neovim.nix index 8e0663f6..d0f10026 100644 --- a/modules/programs/neovim.nix +++ b/modules/programs/neovim.nix @@ -58,6 +58,28 @@ in List here Python 3 packages required for your plugins to work. ''; }; + + configure = mkOption { + type = types.nullOr types.attrs; + default = null; + example = literalExample '' + configure = { + customRC = $'''' + " here your custom configuration goes! + $''''; + packages.myVimPackage = with pkgs.vimPlugins; { + # loaded on launch + start = [ fugitive ]; + # manually loadable by calling `:packadd $plugin-name` + opt = [ ]; + }; + }; + ''; + description = '' + Generate your init file from your list of plugins and custom commands, + and loads it from the store via nvim -u /nix/store/hash-vimrc + ''; + }; }; }; @@ -67,7 +89,7 @@ in inherit (cfg) extraPython3Packages withPython3 extraPythonPackages withPython - withRuby; + withRuby configure; }) ]; };