feat(zsh): update plugins, bat, config for zvm

This commit is contained in:
winston 2023-11-02 17:10:11 +01:00
parent 48bb4f2dc5
commit b24ce90956
Signed by: winston
GPG key ID: 3786770EDBC2B481

View file

@ -27,7 +27,7 @@ in {
}; };
}; };
bat = let bat = let
themes = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "catppuccin"; owner = "catppuccin";
repo = "bat"; repo = "bat";
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1"; rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
@ -36,8 +36,14 @@ in {
in { in {
enable = true; enable = true;
themes = { themes = {
"Catppuccin-latte" = builtins.readFile (themes + /Catppuccin-latte.tmTheme); "catppuccin-latte" = {
"Catppuccin-mocha" = builtins.readFile (themes + /Catppuccin-mocha.tmTheme); inherit src;
file = "Catppuccin-latte.tmTheme";
};
"catppuccin-mocha" = {
inherit src;
file = "Catppuccin-mocha.tmTheme";
};
}; };
}; };
btop = { btop = {
@ -98,17 +104,22 @@ in {
enableAutosuggestions = true; enableAutosuggestions = true;
enableCompletion = true; enableCompletion = true;
initExtraFirst = ''
zvm_config() {
ZVM_VI_HIGHLIGHT_BACKGROUND="black"
ZVM_VI_HIGHLIGHT_FOREGROUND="white"
ZVM_INIT_MODE="sourcing"
ZVM_INSERT_MODE_CURSOR="$ZVM_CURSOR_BLINKING_BEAM"
ZVM_VI_HIGHLIGHT_EXTRASTYLE=bold,underline
}
'';
initExtra = let initExtra = let
functionsDir = "${config.home.homeDirectory}/${config.programs.zsh.dotDir}/functions"; functionsDir = "${config.home.homeDirectory}/${config.programs.zsh.dotDir}/functions";
in '' in ''
for script in "${functionsDir}"/**/*; do for script in "${functionsDir}"/**/*; do source "$script"; done
source "$script"
done
''; '';
envExtra = '' envExtra = ''
export LESSHISTFILE="-" export LESSHISTFILE="-"
export ZVM_INIT_MODE="sourcing"
export ZVM_CURSOR_BLINKING_BEAM="1"
''; '';
dotDir = ".config/zsh"; dotDir = ".config/zsh";
@ -130,7 +141,13 @@ in {
}; };
plugins = with pkgs; (zshPlugins [ plugins = with pkgs; (zshPlugins [
{ {
src = zsh-vi-mode; src = zsh-vi-mode.overrideAttrs (old: {
src = fetchFromGitHub {
inherit (old.src) repo owner;
rev = "a3d717831c1864de8eabf20b946d66afc67e6695";
hash = "sha256-peoyY+krpK/7dA3TW6PEpauDwZLe+riVWfwpFYnRn1Q=";
};
});
file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh"; file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh";
} }
{ {
@ -140,8 +157,7 @@ in {
{ {
src = zsh-fast-syntax-highlighting.overrideAttrs (old: { src = zsh-fast-syntax-highlighting.overrideAttrs (old: {
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "zdharma-continuum"; inherit (old.src) repo owner;
repo = "fast-syntax-highlighting";
rev = "cf318e06a9b7c9f2219d78f41b46fa6e06011fd9"; rev = "cf318e06a9b7c9f2219d78f41b46fa6e06011fd9";
hash = "sha256-RVX9ZSzjBW3LpFs2W86lKI6vtcvDWP6EPxzeTcRZua4="; hash = "sha256-RVX9ZSzjBW3LpFs2W86lKI6vtcvDWP6EPxzeTcRZua4=";
}; };