1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-24 02:39:48 +01:00

neovim: use home.shellAliases

Instead of manually adding it as an alias for each and every
individual shell, which inevitably ends up missing some.
This commit is contained in:
iniw 2024-09-20 03:47:23 -03:00 committed by GitHub
parent 1786e2afdb
commit 2cf3abce03
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -414,6 +414,8 @@ in {
home.sessionVariables = mkIf cfg.defaultEditor { EDITOR = "nvim"; };
home.shellAliases = mkIf cfg.vimdiffAlias { vimdiff = "nvim -d"; };
xdg.configFile =
let hasLuaConfig = hasAttr "lua" config.programs.neovim.generatedConfigs;
in mkMerge (
@ -443,9 +445,5 @@ in {
+ extraMakeWrapperLuaArgs;
wrapRc = false;
});
programs.bash.shellAliases = mkIf cfg.vimdiffAlias { vimdiff = "nvim -d"; };
programs.fish.shellAliases = mkIf cfg.vimdiffAlias { vimdiff = "nvim -d"; };
programs.zsh.shellAliases = mkIf cfg.vimdiffAlias { vimdiff = "nvim -d"; };
};
}