Merge pull request #143421 from ck3d/fix-neovim-EDITOR

nixos/neovim: Respect option defaultEditor
This commit is contained in:
markuskowa 2021-11-01 21:14:04 +01:00 committed by GitHub
commit 6834ca6639
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;