|
1 | | -{ lib, pkgs, ... }: |
| 1 | +{ |
| 2 | + config, |
| 3 | + lib, |
| 4 | + pkgs, |
| 5 | + ... |
| 6 | +}: |
2 | 7 |
|
3 | 8 | let |
4 | 9 | omzPrefix = suffixs: map (i: "ohmyzsh/ohmyzsh " + i) suffixs; |
@@ -50,22 +55,32 @@ lib.mkMerge [ |
50 | 55 | } |
51 | 56 | { |
52 | 57 | antidote.plugins = [ "zsh-users/zsh-autosuggestions" ]; |
53 | | - initContent = lib.mkOrder 800 '' |
54 | | - # https://github.com/zsh-users/zsh-autosuggestions/blob/85919cd1ffa7d2d5412f6d3fe437ebdbeeec4fc5/README.md#suggestion-strategy |
55 | | - ZSH_AUTOSUGGEST_STRATEGY=(match_prev_cmd completion) |
| 58 | + initContent = lib.mkMerge [ |
| 59 | + (lib.mkOrder 800 '' |
| 60 | + # https://github.com/zsh-users/zsh-autosuggestions/blob/85919cd1ffa7d2d5412f6d3fe437ebdbeeec4fc5/README.md#suggestion-strategy |
| 61 | + ZSH_AUTOSUGGEST_STRATEGY=(match_prev_cmd completion) |
56 | 62 |
|
57 | | - # https://github.com/zsh-users/zsh-autosuggestions/issues/238#issuecomment-389324292 |
58 | | - pasteinit() { |
59 | | - OLD_SELF_INSERT=''${''${(s.:.)widgets[self-insert]}[2,3]} |
60 | | - zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`? |
61 | | - } |
| 63 | + # https://github.com/zsh-users/zsh-autosuggestions/issues/238#issuecomment-389324292 |
| 64 | + pasteinit() { |
| 65 | + OLD_SELF_INSERT=''${''${(s.:.)widgets[self-insert]}[2,3]} |
| 66 | + zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`? |
| 67 | + } |
62 | 68 |
|
63 | | - pastefinish() { |
64 | | - zle -N self-insert $OLD_SELF_INSERT |
65 | | - } |
66 | | - zstyle :bracketed-paste-magic paste-init pasteinit |
67 | | - zstyle :bracketed-paste-magic paste-finish pastefinish |
68 | | - ''; |
| 69 | + pastefinish() { |
| 70 | + zle -N self-insert $OLD_SELF_INSERT |
| 71 | + } |
| 72 | + zstyle :bracketed-paste-magic paste-init pasteinit |
| 73 | + zstyle :bracketed-paste-magic paste-finish pastefinish |
| 74 | + '') |
| 75 | + (lib.mkIf (with config.programs.atuin; (enable && enableZshIntegration)) ( |
| 76 | + lib.mkOrder 1010 '' |
| 77 | + # https://github.com/atuinsh/atuin/pull/2903 |
| 78 | + # https://stackoverflow.com/questions/3435355/remove-entry-from-array/52188874#52188874 |
| 79 | + ZSH_AUTOSUGGEST_STRATEGY_EXCLUDE=(atuin) |
| 80 | + ZSH_AUTOSUGGEST_STRATEGY=''${ZSH_AUTOSUGGEST_STRATEGY:|ZSH_AUTOSUGGEST_STRATEGY_EXCLUDE} |
| 81 | + '' |
| 82 | + )) |
| 83 | + ]; |
69 | 84 | } |
70 | 85 | { |
71 | 86 | antidote.plugins = omzPluginPrefix [ "docker" ]; |
|
0 commit comments