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