zsh: update zsh plugins
This commit is contained in:
parent
fcf0bc8f4a
commit
95915cb1cf
|
@ -1,9 +1,10 @@
|
|||
{ config, lib, unstable, ... }:
|
||||
{ config, lib, unstable, pkgs, ... }:
|
||||
let
|
||||
cfg = config.profile.go;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.zsh.initExtra = ''zsh-defer source<(cat ${pkgs.zsh-completions}/share/zsh/site-functions/_golang)'';
|
||||
programs.go = {
|
||||
enable = true;
|
||||
goPrivate = [
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
inherit (lib.lists) optional;
|
||||
inherit (lib.strings) optionalString concatStrings;
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
|
@ -47,6 +47,7 @@ in
|
|||
syntaxHighlighting.enable = true;
|
||||
initExtraFirst = /*bash*/ ''
|
||||
export ZSH_CACHE_DIR=$HOME/.cache/zsh
|
||||
mkdir -p $ZSH_CACHE_DIR/completions
|
||||
|
||||
if [ -f $HOME/.config/zsh/.p10k.zsh ]; then
|
||||
source $HOME/.config/zsh/.p10k.zsh
|
||||
|
@ -57,7 +58,9 @@ in
|
|||
(cat "$_ZSH_COLOR_SCHEME_FILE" &)
|
||||
fi
|
||||
'';
|
||||
initExtra = /*bash*/ ''
|
||||
initExtra = concatStrings [
|
||||
/*bash*/
|
||||
''
|
||||
packfiles() {
|
||||
find $(nix build "nixpkgs#$1" --no-link --print-out-paths)
|
||||
}
|
||||
|
@ -83,7 +86,11 @@ in
|
|||
zstyle ':fzf-tab:*' switch-group '<' '>'
|
||||
# Preview fzf
|
||||
zstyle ':fzf-tab:*' fzf-preview 'eza -1 --color=always $realpath'
|
||||
'';
|
||||
''
|
||||
(optionalString config.profile.podman.enable /*bash*/ ''
|
||||
zsh-defer source <(podman completion zsh)
|
||||
'')
|
||||
];
|
||||
|
||||
plugins = [
|
||||
{
|
||||
|
@ -111,6 +118,11 @@ in
|
|||
src = pkgs.zsh-history-substring-search;
|
||||
file = "share/zsh-history-substring-search/zsh-history-substring-search.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-defer";
|
||||
src = pkgs.zsh-defer;
|
||||
file = "share/zsh-defer/zsh-defer.plugin.zsh";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue