fig icon indicating copy to clipboard operation
fig copied to clipboard

Linux: Fig doesn't respect JSON autocomplete settings

Open kjkent opened this issue 3 years ago • 2 comments

Sanity checks

  • [X] I have searched github.com/withfig/fig/issues and there are no duplicates of my issue
  • [X] I have run fig doctor in the affected terminal session
  • [X] I have run fig restart and tested again (tell us if that fixed it)

Issue Details

Hello! And congrats on the recent Linux release -- I've been excited about this for a long time.

Description:

Fig's autocomplete keybindings behaviour has improved since the resolution of https://github.com/withfig/fig/issues/1758 (aside from keys having multiple bindings in the UI) ; however, the in-terminal window fails to follow the behavior set out by the settings JSON. The two may be linked, but the lack of duplication in the JSON makes me think this is its own issue. Even if the desktop app is responsible for interpreting the JSON rather than Figterm, I think it shouldn't override the written settings.

My settings.json is:

app.beta = true
app.hideMenubarIcon = true
app.launchOnStartup = true
app.preferredTerminal = "Alacritty"
autocomplete.firstTokenCompletion = true
autocomplete.keybindings.command+- = "ignore"
autocomplete.keybindings.command+= = "ignore"
autocomplete.keybindings.command+i = "ignore"
autocomplete.keybindings.control+- = "decreaseSize"
autocomplete.keybindings.control+= = "increaseSize"
autocomplete.keybindings.control+i = "toggleDescription"
autocomplete.keybindings.control+j = "ignore"
autocomplete.keybindings.control+k = "ignore"
autocomplete.keybindings.control+n = "ignore"
autocomplete.keybindings.control+p = "ignore"
autocomplete.keybindings.down = "navigateDown"
autocomplete.keybindings.enter = "insertSelectedAndExecute"
autocomplete.keybindings.shift+tab = "ignore"
autocomplete.keybindings.tab = "insertCommonPrefixOrNavigateDown"
autocomplete.keybindings.up = "navigateUp"
autocomplete.preferVerboseSuggestions = false
autocomplete.theme = "dracula"
integrations.experimental = true
plugins.beta = true

However, Fig shakes on tab and only inserts a selected autocomplete. This is on Fedora 36, on tmux running in Alacritty.

Note: In addition to this, Fig doesn't seem to save to settings.json reliably and ignores a change to the tab behaviour set during new user setup. This has improved since @rahulsarathy's work on https://github.com/withfig/fig/issues/1758; however, I created a new user account and wiped ~/.fig/ and ~/.zshrcand this time selected that tab should insert, rather than shake. However, this selection is ignored by the autocomplete window which still shakes, and the recreated settings.json is empty.

Environment

fig-details:
  - cli-version: 1.4.11
  - desktop-version: 2.3.17
  - figterm-version: 5.2.0
hardware-info:
  - chip-id: AMD Ryzen 5 3600 6-Core Processor
  - cores: 6
  - mem: 15903.723 GB
os-info:
  - kernel: 5.19.6-200.fc36.x86_64
  - distro: "Fedora Linux 36 (Thirty Six)"
  - distro-version: "36 (Thirty Six)"
environment:
  - shell: /usr/bin/zsh
  - terminal: <unknown>
  - cwd: /home/kjkent
  - exe-path: /usr/bin/fig
  - install-method: unknown
  - env-vars:
    - DISPLAY: :0
    - FIG_INTEGRATION_VERSION: 8
    - FIG_PID: 18767
    - FIG_TERM: 1
    - FIG_TERM_TMUX: 1
    - FIG_TERM_VERSION: 5.2.0
    - GLFW_IM_MODULE: ibus
    - GTK_IM_MODULE: ibus
    - PATH: /usr/lib64/ccache:/home/kjkent/.nvm/versions/node/v16.16.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/kjkent/.local/bin:/home/kjkent/.local/share/JetBrains/Toolbox/scripts:/home/kjkent/.fig/bin:/home/kjkent/.local/bin
    - QT_IM_MODULE: ibus
    - SHELL: /usr/bin/zsh
    - TERM: screen-256color
    - TERM_SESSION_ID: e0c298e0-91db-490d-8fa4-4ba688e21018
    - XDG_CURRENT_DESKTOP: KDE
    - XDG_SESSION_DESKTOP: KDE
    - XDG_SESSION_TYPE: x11
    - XMODIFIERS: @im=ibus

kjkent avatar Sep 08 '22 17:09 kjkent

I'm also experiencing this issue on macOS Monterey

mac-h95 avatar Sep 12 '22 11:09 mac-h95

I have the same problem with the fig keybinding setting on my Debian system. Modifying a setting with fig settings <key> <value> seems more reliable than open the json file. However, the keybinding setting is still not working. Not only does the bug holds for Tab and Enter, but for other non-preset keys as well. For me, ^j ^k ^r, etc, are all not working. I thought that may be caused by key conflicts, so I changed it to meta + j. But it doesn't take effect.

ZoukiLi avatar Oct 03 '22 18:10 ZoukiLi

Same issue here on macOS Ventura 13.0.1. Changing autocomplete-related settings in the Fig UI has no effect, even after restarting Fig, the shell, etc. Changing settings in the fig settings CLI works immediately. Happy to share more debugging details if helpful.

donmccurdy avatar Nov 27 '22 19:11 donmccurdy