options: add viAlias and vimAlias (#75)

This commit is contained in:
*Kim Zick 2022-12-08 12:12:57 -05:00 committed by GitHub
parent 472e10f069
commit a7fbb81224
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,6 +22,22 @@ let
in in
{ {
options = { options = {
viAlias = mkOption {
type = types.bool;
default = false;
description = ''
Symlink <command>vi</command> to <command>nvim</command> binary.
'';
};
vimAlias = mkOption {
type = types.bool;
default = false;
description = ''
Symlink <command>vim</command> to <command>nvim</command> binary.
'';
};
package = mkOption { package = mkOption {
type = types.package; type = types.package;
default = pkgs.neovim-unwrapped; default = pkgs.neovim-unwrapped;
@ -97,6 +113,7 @@ in
normalizedPlugins = map (x: defaultPlugin // (if x ? plugin then x else { plugin = x; })) config.extraPlugins; normalizedPlugins = map (x: defaultPlugin // (if x ? plugin then x else { plugin = x; })) config.extraPlugins;
neovimConfig = pkgs.neovimUtils.makeNeovimConfig ({ neovimConfig = pkgs.neovimUtils.makeNeovimConfig ({
inherit (config) viAlias vimAlias;
# inherit customRC; # inherit customRC;
plugins = normalizedPlugins; plugins = normalizedPlugins;
} }