PatrickF1 / fzf.fish

🔍🐟 Fzf plugin for Fish
MIT License
1.96k stars 78 forks source link

Can't use difftastic as fzf_diff_highlighter #306

Closed roland-5 closed 1 year ago

roland-5 commented 1 year ago

Before proceeding...

Describe the bug

I can use delta, riff and others diffs app you mentionen for v10, but instead of diff highlight it shows difftastic help page if I want to use difftastic.

ps_20230822232931

Steps to reproduce

Instead delta or riff, try difftastic

Environment

Versions installed:

My whole fish config

set -U fish_greeting

# Hishtory Config:
export PATH="$PATH:/home/roland/.hishtory"
source /home/roland/.hishtory/config.fish

set -Up fish_user_paths ~/.cargo/bin

set -x STARSHIP_CONFIG ~/.config/starship/config.toml
set -x STARSHIP_CACHE ~/.config/starship/cache

set -Ux GOPATH ~/.cache/go

starship init fish | source
zoxide init fish | source

set -x FZF_DEFAULT_COMMAND 'fd --type f'
set fzf_diff_highlighter difft
set fzf_history_time_format %y-%m-%d

set -x MANPAGER "sh -c 'col -bx | bat -l man -pp'"

jj util completion --fish | source

#source /etc/grc.fish

# custom theming
set -Ux WLR_RENDERER vulkan
set -Ux GDK_BACKEND wayland
set -Ux SDL_VIDEODRIVER wayland
set -Ux CLUTTER_BACKEND wayland
set -Ux XDG_CURRENT_DESKTOP sway
set -Ux XDG_SESSION_TYPE wayland
set -Ux XDG_SESSION_DESKTOP sway
set -Ux QT_AUTO_SCREEN_SCALE_FACTOR 1
set -Ux QT_QPA_PLATFORM wayland
set -Ux QT_WAYLAND_DISABLE_WINDOWDECORATION 1
set -Ux QT_QPA_PLATFORMTHEME qt5ct

set -Ux SSH_AUTH_SOCK "$XDG_RUNTIME_DIR/ssh-agent.socket"

set -Ux XDG_PICTURES_DIR ~/Obhrazy

alias bs='buku -n 1000 -s'
alias bS='buku -n 1000 -S'
alias bd='buku -d'
alias bw='buku -w'
alias cat='bat --style=plain --paging=never'
alias diff='delta'
alias diff2='difft'
alias find='fd'
alias gpu='git pull'
alias gpp='git push'
alias grep='rg'
alias ip='ip -c'
alias ls='exa --octal-permissions --header --icons --group --time-style=long-iso --git --group-directories-first -l'
alias lst='exa -T --octal-permissions --header --icons --group --time-style=long-iso --all -l -L'
alias lsblk2='lsblk -o name,fstype,mountpoints,size,rm,ro,type,model'
alias nnn='nnn -dU'
alias ouc='ouch compress'
alias oud='ouch decompress'
alias oul='ouch list --tree'
alias ping='grc ping'
alias rmf='trash put'
alias rml='trash list'
alias tsm-add-internety='transmission-remote -a ~/Internety/*torrent'
alias tsm-add='transmission-remote --add'
alias tsm-list-active='transmission-remote -tactive -l'
alias tsm-list-all='transmission-remote --list'
alias tsm-start='transmission-daemon'
alias tsm-stop='transmission-remote --exit'
alias vi='nvim'
alias vim='nvim'
alias watch-tsm='watch -c -n 3 "transmission-remote -tactive -l"'
alias wget='wget -c --show-progress'
alias whoami='uu-whoami'
alias zathura='zathura --fork'
alias zl="zi && ls && z -"
alias rmz='rmz -f'

# Set default terminal
set -gx TERMINAL alacritty

# visual editor
set -gx VISUAL nvim

# editor
set -gx EDITOR nvim

# web browser
set -gx BROWSER librewolf

# git pager
# set -gx GIT_PAGER delta

# yt-dlp
function ytl
    yt-dlp --list-formats "$argv"
end

# function rm
#     mv "$argv" /home/roland/.local/share/Trash/files/
# end
PatrickF1 commented 1 year ago

Hi! I'm not sure this is possible. Can you try overwrite the preview command to pass in GIT_EXTERNAL_DIFF=difft before the command through fzf_git_log_opts? I don't use Difftastic myself but reading this https://difftastic.wilfred.me.uk/git.html, it seems it requires special configuration because it requires the file before AND after changes.

roland-5 commented 1 year ago

It didn't work. Too hacky to play with it. I will stick with riff. Thanks!

PatrickF1 commented 1 year ago

Sorry to hear you couldn't get it to work. Difftastic seems very promising. Once it's out of alpha, I may try it myself and then figure out how to integrate it. But for now, it's definitely not a fzf.fish bug and more of a complex design issue with Difftastic, so I won't be trying it myself.