diff --git a/zsh.nix b/zsh.nix index 93c1b14..923fc79 100644 --- a/zsh.nix +++ b/zsh.nix @@ -3,39 +3,7 @@ pkgs, ... }: { - home.packages = with pkgs; [ - nix-zsh-completions - - # tools for aliases, etc. - lsd - bat - eza - trash-cli - # ^ tools for aliases, etc. - - # packages for enhancd - fzf # enhancd - fd # enhancd - # ^ packages for enhancd - - # rofi # for fd - - # packags for ex - gnutar - bzip3 - unzip - p7zip - unrar - gzip - # ^ packages for ex - - ]; - programs = { - # nix-index = { - # enable = true; - # enableZshIntegration = true; - # }; # thefuck = { # enable = true; # enableZshIntegration = true; @@ -48,7 +16,27 @@ zsh = { enable = true; + enableVteIntegration = true; + enableCompletion = true; + completionInit = '' + # Basic auto/tab complete: + autoload -U compinit + zstyle ':completion:*' menu select + zmodload zsh/complist + compinit + _comp_options+=(globdots) # Include hidden files. + ''; + + autosuggestion = { + enable = true; + strategy = [ + "match_prev_cmd" + "completion" + "history" + ]; + }; + zplug = { enable = true; plugins = [ @@ -105,19 +93,10 @@ # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh - export YSU_MESSAGE_POSITION="after" # you-should-use plugin - export ASCIINEMA_API_URL=https://asciinema.stefka.eu if [ -v ASCIINEMA_REC ]; then _zsh_autosuggest_disable fi - # Basic auto/tab complete: - autoload -U compinit - zstyle ':completion:*' menu select - zmodload zsh/complist - compinit - _comp_options+=(globdots) # Include hidden files. - # Custom ZSH Binds bindkey '^ ' autosuggest-accept bindkey "^[[H" beginning-of-line @@ -167,6 +146,11 @@ fi ''; + localVariables = { + YSU_MESSAGE_POSITION="after"; + ASCIINEMA_API_URL="https://asciinema.stefka.eu"; + }; + shellAliases = { # update = "sudo nixos-rebuild switch"; @@ -231,4 +215,31 @@ }; }; }; + + home.packages = with pkgs; [ + nix-zsh-completions + + # tools for aliases, etc. + lsd + bat + eza + trash-cli + # ^ tools for aliases, etc. + + # packages for enhancd + fzf # enhancd + fd # enhancd + # ^ packages for enhancd + + # rofi # for fd + + # packags for ex + gnutar + bzip3 + unzip + p7zip + unrar + gzip + # ^ packages for ex + ]; }