diff --git a/sheldon.toml b/sheldon.toml index 9f1fc82..c131a27 100644 --- a/sheldon.toml +++ b/sheldon.toml @@ -43,6 +43,15 @@ local = "~/.zsh/plugins" local = "~/.zsh/plugins" apply = ["defer"] +[plugins.fzf] +github = "junegunn/fzf" +use = ["shell/completion.zsh", "shell/key-bindings.zsh"] +apply = ["defer"] + +[plugins.fzf-completions] +local = "~/.zsh/plugins" +apply = ["defer"] + [plugins.zsh-syntax-highlighting] github = "zsh-users/zsh-syntax-highlighting" apply = ["defer"] @@ -81,11 +90,6 @@ apply = ["defer"] local = "~/.zsh/plugins" apply = ["defer"] -[plugins.fzf] -local = "~/.zsh/plugins" -apply = ["defer"] -hooks.pre = "export FZF_COMPLETION_TRIGGER='~~'" - # This works best if it is placed last. [plugins.compinit] local = "~/.zsh/plugins" diff --git a/zsh/fzf-completions.zsh b/zsh/plugins/fzf-completions.plugin.zsh similarity index 59% rename from zsh/fzf-completions.zsh rename to zsh/plugins/fzf-completions.plugin.zsh index 37c6461..907a9e1 100644 --- a/zsh/fzf-completions.zsh +++ b/zsh/plugins/fzf-completions.plugin.zsh @@ -1,6 +1,4 @@ -# fzf completions -test -e /opt/homebrew/opt/fzf/shell/completion.zsh && source /opt/homebrew/opt/fzf/shell/completion.zsh -test -e /usr/share/fzf/completion.zsh && source /usr/share/fzf/completion.zsh +#!/usr/bin/env zsh # cURL completions copied from https://blog.revathskumar.com/2024/02/curl-fuzzy-search-options-using-fzf.html _fzf_complete_curl() { diff --git a/zsh/plugins/fzf.plugin.zsh b/zsh/plugins/fzf.plugin.zsh deleted file mode 100644 index 91413ef..0000000 --- a/zsh/plugins/fzf.plugin.zsh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env zsh - -# Setup fzf completions -if (( ${+commands[fzf]} )); then - eval "$(fzf --zsh)" -fi