From 114303e4b47ae0fdc1d50ad761ecf2288f32d2ea Mon Sep 17 00:00:00 2001 From: Anthony Cicchetti Date: Mon, 26 Aug 2024 09:28:52 -0400 Subject: [PATCH] vale + zsh-autosuggestions --- nix/home-manager/flake.lock | 6 +++--- nix/home-manager/modules/packages/default.nix | 1 + nix/home-manager/modules/packages/zsh.nix | 3 +++ zsh/funcs/atuin | 11 +++++++++++ 4 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 zsh/funcs/atuin diff --git a/nix/home-manager/flake.lock b/nix/home-manager/flake.lock index 8d6de61..f2b2e58 100644 --- a/nix/home-manager/flake.lock +++ b/nix/home-manager/flake.lock @@ -282,11 +282,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1724673204, - "narHash": "sha256-xm9g1at41a+K4c18Ph0VK91EsyVTzSn3oRt+MxAjyno=", + "lastModified": 1724676119, + "narHash": "sha256-SIq2yR3FEooHWxiRoI0e6mThCgOWHl/OMw+wYYuiov8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "96948c38c80a3eaec083f8a42fdc1882cc92e073", + "rev": "f4f99617e4838b442d4bf5ed0ac6437df9bad040", "type": "github" }, "original": { diff --git a/nix/home-manager/modules/packages/default.nix b/nix/home-manager/modules/packages/default.nix index ae7c93f..a4be768 100644 --- a/nix/home-manager/modules/packages/default.nix +++ b/nix/home-manager/modules/packages/default.nix @@ -66,6 +66,7 @@ in { sqlite tmux # vscode-fhs + vale python312Packages.yt-dlp zenith # zoom-us diff --git a/nix/home-manager/modules/packages/zsh.nix b/nix/home-manager/modules/packages/zsh.nix index 2ece39d..d976680 100644 --- a/nix/home-manager/modules/packages/zsh.nix +++ b/nix/home-manager/modules/packages/zsh.nix @@ -57,6 +57,9 @@ in { ]; useFriendlyNames = true; }; + autosuggestion = { + enable = true; + }; dirHashes = { "-- -dotfiles" = "$HOME/.dotfiles"; "-- -src" = "$HOME/src"; diff --git a/zsh/funcs/atuin b/zsh/funcs/atuin new file mode 100644 index 0000000..d164838 --- /dev/null +++ b/zsh/funcs/atuin @@ -0,0 +1,11 @@ +# zsh-vi-mode for some reason is overriding these - so overriding them back +bindkey -M emacs '^r' atuin-search +bindkey -M viins '^r' atuin-search-viins +bindkey -M vicmd '/' atuin-search +bindkey -M emacs '^[[A' atuin-up-search +bindkey -M vicmd '^[[A' atuin-up-search-vicmd +bindkey -M viins '^[[A' atuin-up-search-viins +bindkey -M emacs '^[OA' atuin-up-search +bindkey -M vicmd '^[OA' atuin-up-search-vicmd +bindkey -M viins '^[OA' atuin-up-search-viins +bindkey -M vicmd 'k' atuin-up-search-vicm