Skip to content

Commit

Permalink
feat: shell improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman committed Oct 28, 2023
1 parent dbceaf5 commit ef692dd
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 28 deletions.
8 changes: 8 additions & 0 deletions modules/home/suites/common/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,13 @@ in
topgrade = enabled;
};
};

programs.readline = {
enable = true;

extraConfig = ''
set completion-ignore-case on
'';
};
};
}
55 changes: 27 additions & 28 deletions modules/home/system/shell/zsh/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,24 @@ in
programs = {
zsh = {
enable = true;
package = pkgs.zsh;

completionInit = ''
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
'';

enableAutosuggestions = true;
enableCompletion = true;
syntaxHighlighting.enable = true;

sessionVariables = {
KEYTIMEOUT = 0;
};

syntaxHighlighting = {
enable = true;
package = pkgs.zsh-syntax-highlighting;
};

initExtra = ''
# Use vim bindings.
set -o vi
Expand All @@ -42,39 +52,18 @@ in
'';

plugins = [
# {
# name = "zsh-autocomplete";
# src = pkgs.zsh-autocomplete;
# }
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = pkgs.zsh-nix-shell;
}
{
name = "zsh-autocomplete";
src = pkgs.zsh-autocomplete;
}
{
name = "zsh-autosuggestions";
src = pkgs.zsh-autosuggestions;
}
{
name = "zsh-syntax-highlighting";
src = pkgs.zsh-syntax-highlighting;
}
{
name = "zsh-you-should-use";
src = pkgs.zsh-you-should-use;
}
{
name = "zsh-history";
src = pkgs.zsh-history;
name = "zsh-command-time";
src = pkgs.zsh-command-time;
}
{
name = "zsh-history";
src = pkgs.zsh-history;
}
{
name = "zsh-command-time";
src = pkgs.zsh-command-time;
}
{
name = "zsh-history-to-fish";
src = pkgs.zsh-history-to-fish;
Expand All @@ -83,6 +72,16 @@ in
name = "zsh-navigation-tools";
src = pkgs.zsh-navigation-tools;
}
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = pkgs.zsh-nix-shell;
}
{
name = "zsh-you-should-use";
src = pkgs.zsh-you-should-use;
}

];
};
};
Expand Down
2 changes: 2 additions & 0 deletions modules/nixos/user/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ in
propagatedIcon
];

environment.pathsToLink = [ "/share/zsh" ];

programs.zsh = {
enable = true;
autosuggestions.enable = true;
Expand Down

0 comments on commit ef692dd

Please sign in to comment.