nixos/neovim: Respect option defaultEditor

This commit is contained in:
Christian Kögler 2021-10-28 18:51:44 +02:00
parent 850251213a
commit 6c0804f1b0

View file

@ -139,7 +139,7 @@ in {
environment.systemPackages = [
cfg.finalPackage
];
environment.variables = { EDITOR = mkOverride 900 "nvim"; };
environment.variables.EDITOR = mkIf cfg.defaultEditor (mkOverride 900 "nvim");
programs.neovim.finalPackage = pkgs.wrapNeovim cfg.package {
inherit (cfg) viAlias vimAlias;