commit fa2eb28f95fae291db6118ec4b9df517ce9cacda
parent 00e3d4c291a1d6e205d9ee67e825f19c5596a7b4
Author: Vincent Demeester <vincent@sbr.pm>
Date: Fri, 4 Oct 2019 10:08:01 +0200
profiles.zsh: add nix-zsh-completions and fix fpath
home-manager doesn't seem to add
`$HOME/.nix-profile/share/zsh/site-functions` in fpath, making a lot
of completion file not taken into account. This fixes that.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules/profiles/zsh.nix b/modules/profiles/zsh.nix
@@ -18,11 +18,11 @@ in
{
home.packages = with pkgs; [
zsh-syntax-highlighting
+ nix-zsh-completions
];
home.file."${config.programs.zsh.dotDir}/completion.zsh".source = ./assets/zsh/completion.zsh;
home.file."${config.programs.zsh.dotDir}/prompt.zsh".source = ./assets/zsh/prompt.zsh;
home.file."${config.programs.zsh.dotDir}/functions/j".source = ./assets/zsh/j;
- home.file."${config.programs.zsh.dotDir}/functions/_rg".source = ./assets/zsh/_rg;
programs.zsh = {
enable = true;
dotDir = ".config/zsh";
@@ -74,8 +74,8 @@ in
src = pkgs.fetchFromGitHub {
owner = "zsh-users";
repo = "zsh-completions";
- rev = "cf565254e26bb7ce03f51889e9a29953b955b1fb";
- sha256 = "1yf4rz99acdsiy0y1v3bm65xvs2m0sl92ysz0rnnrlbd5amn283l";
+ rev = "922eee0706acb111e9678ac62ee77801941d6df2";
+ sha256 = "04skzxv8j06f1snsx62qnca5f2183w0wfs5kz78rs8hkcyd6g89w";
};
}
];
@@ -84,6 +84,7 @@ in
'';
initExtra = ''
path+="$HOME/${config.programs.zsh.dotDir}/functions"
+ fpath+="$HOME/.nix-profile/share/zsh/site-functions"
fpath+="$HOME/${config.programs.zsh.dotDir}/functions"
for func ($HOME/${config.programs.zsh.dotDir}/functions) autoload -U $func/*(x:t)
autoload -Uz select-word-style; select-word-style bash