summaryrefslogtreecommitdiff
path: root/users/seth/shell/zsh/default.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2022-12-02 08:10:15 +0000
committerseth <[email protected]>2022-12-02 08:11:08 +0000
commit1f3e4b6ad522a186d2b693953b4c6f5ab1e892b7 (patch)
tree30d1baf3e915a13106695723ad1a0878b39886cd /users/seth/shell/zsh/default.nix
parent0912f5dc12cde4f925a0669aa6c1cbdb189b503d (diff)
add editorconfig and alejandra
Diffstat (limited to 'users/seth/shell/zsh/default.nix')
-rw-r--r--users/seth/shell/zsh/default.nix47
1 files changed, 25 insertions, 22 deletions
diff --git a/users/seth/shell/zsh/default.nix b/users/seth/shell/zsh/default.nix
index d8e7bc6..f614804 100644
--- a/users/seth/shell/zsh/default.nix
+++ b/users/seth/shell/zsh/default.nix
@@ -1,13 +1,16 @@
-{ config, lib, pkgs, ... }:
-
{
+ config,
+ lib,
+ pkgs,
+ ...
+}: {
programs.zsh = {
enable = true;
- enableAutosuggestions = true;
- enableSyntaxHighlighting = true;
- enableVteIntegration = true;
- completionInit = ''
- autoload -Uz bashcompinit compinit
+ enableAutosuggestions = true;
+ enableSyntaxHighlighting = true;
+ enableVteIntegration = true;
+ completionInit = ''
+ autoload -Uz bashcompinit compinit
local zdump="${config.xdg.cacheHome}/zsh/zdump"
bashcompinit
compinit -d "$zdump"
@@ -16,8 +19,8 @@
zcompile "$zdump"
fi
unset zdump
- '';
- defaultKeymap = "emacs";
+ '';
+ defaultKeymap = "emacs";
dotDir = ".config/zsh";
initExtra = ''
zmodload zsh/zutil
@@ -39,14 +42,14 @@
# clear backbuffer with ctrl-l
function clear-screen-and-scrollback() {
- echoti civis >"$TTY"
- printf '%b' '\e[H\e[2J' >"$TTY"
- zle .reset-prompt
- zle -R
- printf '%b' '\e[3J' >"$TTY"
- echoti cnorm >"$TTY"
+ echoti civis >"$TTY"
+ printf '%b' '\e[H\e[2J' >"$TTY"
+ zle .reset-prompt
+ zle -R
+ printf '%b' '\e[3J' >"$TTY"
+ echoti cnorm >"$TTY"
}
-
+
zle -N clear-screen-and-scrollback
bindkey '^L' clear-screen-and-scrollback
'';
@@ -83,12 +86,12 @@
{
name = "cattppuccin-zsh-syntax-highlighting";
- src = pkgs.fetchFromGitHub {
- owner = "catppuccin";
- repo = "zsh-syntax-highlighting";
- rev = "06d519c20798f0ebe275fc3a8101841faaeee8ea";
- sha256 = "sha256-Q7KmwUd9fblprL55W0Sf4g7lRcemnhjh4/v+TacJSfo=";
- };
+ src = pkgs.fetchFromGitHub {
+ owner = "catppuccin";
+ repo = "zsh-syntax-highlighting";
+ rev = "06d519c20798f0ebe275fc3a8101841faaeee8ea";
+ sha256 = "sha256-Q7KmwUd9fblprL55W0Sf4g7lRcemnhjh4/v+TacJSfo=";
+ };
file = "themes/catppuccin_mocha-zsh-syntax-highlighting.zsh";
}