withfig / fig

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

Integrate with `zellij` tiling manager #2199

Open digika-ding opened 1 year ago

digika-ding commented 1 year ago

Checks

Operating system

macOS 13.1.0 (22C65)

Expected behaviour

code completion

Actual behaviour

no code completion

Steps to reproduce

No response

Environment

fig-details:
  - 2.10.1
hardware-info:
  - model:
  - model-id:
  - chip-id: Apple M1 Max
  - cores: 10
  - mem: 64.00 GB
os-info:
  - macOS 13.1.0 (22C65)
environment:
  - shell: /bin/zsh
  - terminal: alacritty
  - cwd: /Users/weibingding
  - exe-path: /Users/weibingding/.fig/bin/fig
  - install-method: unknown
  - env-vars:
    - FIGTERM_SESSION_ID: 6c0bc7ef-5fb4-4336-b2cb-8d787c309af1
    - FIG_HOSTNAME: WeibingacStudio
    - FIG_SET_PARENT_CHECK: 1
    - FIG_TERM: 2.10.1
    - PATH: /opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/weibingding/.fig/bin:/Users/weibingding/.local/bin
    - SHELL: /bin/zsh
    - TERM: xterm-256color
    - __CFBundleIdentifier: org.alacritty
    - FIG_PID: 6030
    - FIG_SET_PARENT: 6c0bc7ef-5fb4-4336-b2cb-8d787c309af1
❯ zellij --version
zellij 0.34.3

zshrc

# Fig pre block. Keep at the top of this file.
[[ -f "$HOME/.fig/shell/zshrc.pre.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.pre.zsh"
eval "$(starship init zsh)"
eval "$(zellij setup --generate-auto-start zsh)"

# Fig post block. Keep at the bottom of this file.
[[ -f "$HOME/.fig/shell/zshrc.post.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.post.zsh"
megumish commented 1 year ago

@digika-ding

I was also using zellij in Alacritty and had a problem with autocomplete not working. But I solved the problem by setting the startup shell to zellij in the Alacritty configuration file.

I have included the Alacritty configuration below.

shell:
  program: <zellij executable path>
  args:
    - attach
    - --index
    - "0"
    - --create
johnnyBira commented 1 year ago

I've got the same problem in Kitty. I'm also on MacOS and I've tried running fig doctor and fig restart but haven't been able to resolving the problem.

digika-ding commented 1 year ago

Thank you! @megumish Work for me!

KorboCoder commented 1 year ago

Work around I did was set TMUX env before the fig pre block for .zshrc. Then unset TMUX after the pre block.

if [[ -n "${ZELLIJ}" ]]; then
    export TMUX="true"
fi
# Fig pre block. Keep at the top of this file.
[[ -f "$HOME/.fig/shell/zshrc.pre.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.pre.zsh"
unset TMUX