withfig / fig

Public issue tracker for Fig.
https://fig.io
MIT License
2.06k stars 63 forks source link

Zsh-autosuggestions conflict #1543

Open antony-frolov opened 2 years ago

antony-frolov commented 2 years ago

Sanity checks

Issue Details

Description:

Fig autosuggestions behave inconsistently when zsh-autosuggestions is enabled. Installing zsh-autosuggestions with Fig also doesn't help. Disabling zsh-autosuggestions solves the problem. Fig doctor tells me that everything is fine.

Screenshot 2022-06-16 at 14 44 22

https://user-images.githubusercontent.com/69483357/174062007-c3203819-85bd-474f-b053-ca8350d6dba9.mp4

Environment

# Fig Diagnostics
## Fig details:
  - Fig version: Version 1.0.57 (B450) [ABC]
  - Bundle path: /Applications/Fig.app
  - Autocomplete: true
  - Settings.json: true
  - Accessibility: true
  - Number of specs: 0
  - Symlinked dotfiles: false
  - Only insert on tab: false
  - Keybindings path:
  - Installation Script: true
  - PseudoTerminal Path: /Users/antony/miniforge3/condabin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Library/Apple/usr/bin:/Users/antony/.fig/bin:/Users/antony/.local/bin:/opt/homebrew/opt/fzf/bin
  - SecureKeyboardInput: false
  - SecureKeyboardProcess: <none>
## Hardware Info:
  - Model Name: MacBook Air
  - Model Identifier: MacBookAir10,1
  - Chip: Apple M1
  - Cores: 8 (4 performance and 4 efficiency)
  - Memory: 8 GB
## OS Info:
  - macOS 12.4.0 (21F79)
## Environment:
  - User Shell: /bin/zsh
  - Current Directory: /Users/antony
  - CLI Installed: true
  - Executable Location: /usr/local/bin/fig
  - Current Window ID: 34306/% (com.googlecode.iterm2)
  - Active Process: zsh (1962) - not a tty
  - Environment Variables:
    - TERM_SESSION_ID=w0t0p0:A3C6B8FC-1F73-43CD-8D86-2AB9DA761BCA
    - PATH=/Users/antony/miniforge3/condabin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Library/Apple/usr/bin:/Users/antony/.fig/bin:/Users/antony/.local/bin:/opt/homebrew/opt/fzf/bin
    - TERM=xterm-256color
    - FIG_INTEGRATION_VERSION=8
    - FIG_TERM=1
    - FIG_TERM_VERSION=4.4.0
    - FIG_PID=1962
## Integrations:
  - SSH: false
  - TMUX: false
  - iTerm: installed!
  - Hyper: installed!
  - Visual Studio Code: installed!
  - Docker: false
dpfahlbusch commented 2 years ago

Thanks for this issue! "Solved" my problem too :)

0scarecrow0 commented 2 years ago

I also have this problem. How can I solve it?

carseven commented 2 years ago

I have the same problem. @0scarecrow0 If I disable zsh-autosuggestions, fig works properly again. image

But it would be nice to have zsh-autosuggestions while using fig!

fredrikaverpil commented 2 years ago

Same problem here too. Any workaround other than disabling zsh-autosuggestions?

antony-frolov commented 2 years ago

Try sourcing zsh-syntax-highlighting last, I guess that helped me.

rhryansu commented 1 year ago

I spent an evening to figure this out then finally I found this probably could help you guys. If you are seeing zsh-autosuggestion autocompleting your commands as it turns write instead of grey as normal. Try to remove zsh-autosuggestions and zsh-syntax-highlighting from your disk and then re-install them, restart your terminal and you might see everything works.

fredrikaverpil commented 1 year ago

@rhryansu weird, same here. This just started working for me. Maybe after a reboot or after having pulled down the latest of zsh-autosuggestions and/or zsh-syntax-highlighting. Not sure 🤷 but at least now auto-suggestions, highlighting and fig works on my Apple M1 machine in zsh 🎉

EDIT: turns out it only "kind of" works. I have to type cd followed by space and the two first characters of the folder name before the popup shows.

biko8 commented 1 year ago

Thanks for this issue! "Solved" my problem too :)

How you solved it?

bitflorist commented 1 year ago

@biko8 I removed it, to make it work.

wey-gu commented 1 year ago

Here is what I did:

cd $ZSH_CUSTOM/plugins/zsh-autosuggestions
git pull
cd $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
git pull

And all solved!