diff --git a/home-manager/shell/zsh-plugins.nix b/home-manager/shell/zsh-plugins.nix index 7786e7d0..50bd6c1f 100644 --- a/home-manager/shell/zsh-plugins.nix +++ b/home-manager/shell/zsh-plugins.nix @@ -1,28 +1,13 @@ -{ - lib, - pkgs, - ... -}: { - # Zsh plugins - programs.zsh.plugins = [ - { - name = "zsh-autocomplete"; - src = pkgs.fetchFromGitHub { - owner = "marlonrichert"; - repo = "zsh-autocomplete"; - rev = "196810035992abea65e54852c4278af2069ee482"; # latest commit - hash = "sha256-bzOTeYWrzuYNbeat30zijKJ9kflRhdE/0wD2HwZWXbU="; - }; - } - { - name = "fast-syntax-highlighting"; - src = pkgs.fetchFromGitHub { - owner = "zdharma-continuum"; - repo = "fast-syntax-highlighting"; - rev = "cf318e06a9b7c9f2219d78f41b46fa6e06011fd9"; # latest commit - hash = "sha256-RVX9ZSzjBW3LpFs2W86lKI6vtcvDWP6EPxzeTcRZua4="; - }; - } +{lib, ...}: { + # Zsh plugins' + programs.zsh.autosuggestion.enable = true; # enable autosuggestion plugin + programs.zsh.antidote.enable = true; # Plugin manager + programs.zsh.antidote.plugins = [ + # Note the order, it's important: https://github.com/zsh-users/zsh-syntax-highlighting/issues/951 + "zdharma-continuum/fast-syntax-highlighting" + "marlonrichert/zsh-autocomplete" ]; programs.zsh.enableCompletion = lib.mkForce false; # disable for zsh autocomplete plugin + + # programs.zsh.historySubstringSearch.enable = true; # not compatible with zsh-autocomplete } diff --git a/home-manager/shell/zsh.nix b/home-manager/shell/zsh.nix index a153b431..c1bd4f7c 100644 --- a/home-manager/shell/zsh.nix +++ b/home-manager/shell/zsh.nix @@ -10,8 +10,6 @@ in { programs.zsh = { enable = true; - autosuggestion.enable = true; - historySubstringSearch.enable = true; sessionVariables = commonSessionVariables // {