Coder Social home page Coder Social logo

Comments (35)

mschrage avatar mschrage commented on July 21, 2024 26

Better late than never! Support for Alacritty is coming soon... 🀩

Screen Shot 2021-09-01 at 11 38 25 PM

from fig.

mschrage avatar mschrage commented on July 21, 2024 20

A preview of the Alacritty integration is available. However, currently the integration is a bit tricky to setup which is why it is hidden by default.

Instructions:

  1. Run fig settings integrations.experimental true and then restart the Fig app
  2. Click the Fig menubar icon > Integrations > Alacritty > "Attempt to Install"
  3. Go to a terminal and run fig debug ime enable. A System Preferences window will appear and prompt you to install a third party Input Method.
  4. Run fig debug ime select
  5. Restart Alacritty and autocomplete should appear🀞

from fig.

sullivan-sean avatar sullivan-sean commented on July 21, 2024 17

We had to temporarily remove support for Alacritty due to issues with macOS Monterey. Luckily, we will be supporting it again soon.

Re-opening this for now for anyone who wants to subscribe for when we've re-integrated

from fig.

Integralist avatar Integralist commented on July 21, 2024 9

Thanks @mschrage!

So interestingly, although I got the following error UI...

Screenshot 2022-01-28 at 09 57 28

It looks like it still worked fine 🀷🏻

Screenshot 2022-01-28 at 10 06 06

πŸŽ‰ ❀️

from fig.

mschrage avatar mschrage commented on July 21, 2024 6

This is landing in v1.0.49 (coming out in next day or two)!!!

from fig.

Milo123459 avatar Milo123459 commented on July 21, 2024 4

You guys never fail to amaze! 😌

from fig.

mschrage avatar mschrage commented on July 21, 2024 2

Important note: Alacritty does not support tabs, so all that is required for the integration is some way of determining the cursor position.

from fig.

Integralist avatar Integralist commented on July 21, 2024 1

Just going to leave another update, which is it seems it's working BUT not when within a tmux shell.

Still debugging and will give an update if I find anything interesting.

EDIT: I have source-file ~/.fig/tmux at the bottom of my .tmux.conf file and the contents of ~/.fig/tmux is:

set-hook -ga window-pane-changed 'run-shell "fig bg:tmux #{pane_id}"'
#set-hook -ga session-windows-changed 'run-shell "fig bg:tmux #{pane_id}"'
set-hook -ga client-session-changed 'run-shell "fig bg:tmux #{pane_id}"'

# set-hook -ga client-detached run-shell 'run-shell "fig bg:tmux closed"'
set-hook -ga session-closed 'run-shell "fig bg:tmux '%'"'

UPDATE: I removed the following two lines from my .tmux.conf and found autocomplete would start working:

set -g default-terminal "screen-256color"
set -ga terminal-overrides ",*256col*:Tc"

But then I put them back and started a fresh Alacritty + tmux instance and things still worked πŸ€”

UPDATE 2: LOL. The Alacritty terminal + tmux instance that was just working, and I didn't do anything other than look at my email in my web browser has suddenly stopped working again. πŸ€·πŸ»β€β™‚οΈ

UPDATE 3: I continued on, accepting fig wasn't working, when suddenly it started working again!? Happened after 5 minutes or so. In that time I compiled a Rust project and ran a tar command, not sure what magic voodoo caused it to come back to life though πŸ™‚

from fig.

chrisgrieser avatar chrisgrieser commented on July 21, 2024 1

fig install --input-method is not working for me. Popup appears, but does not enable completions in alacritty

from fig.

Integralist avatar Integralist commented on July 21, 2024 1

Well. Looks like I should have asked sooner 🀦🏻 because seeing in the above diagnostics install-method: unknown I decided to scroll back up this thread and run fig integrations install input-method which then asked me to restart my terminal, and since doing that it appears the autocomplete drop-down is starting to appear where it should be πŸŽ‰

from fig.

Integralist avatar Integralist commented on July 21, 2024

@mschrage I've just got a new MacBook Pro M1 and it seems the instructions above no longer apply 😞
Screenshot 2022-04-07 at 23 19 18

from fig.

mschrage avatar mschrage commented on July 21, 2024

Did you restart Fig @Integralist ?

from fig.

Integralist avatar Integralist commented on July 21, 2024

OK that is working now.

It took...

  • Restart (x2, first time didn't indicate any difference, second time it did).
  • Install of Alacritty integration plugin (x2, first time failed).
  • Allow custom keyboard cursor (x2, first time failed).

from fig.

mschrage avatar mschrage commented on July 21, 2024

@Integralist could be related to #1229?

from fig.

Integralist avatar Integralist commented on July 21, 2024

@mschrage I don't full screen my apps, so in this case that linked issue looks to be unrelated.

from fig.

mschrage avatar mschrage commented on July 21, 2024

@Integralist can you run fig doctor and create a separate issue?

from fig.

mschrage avatar mschrage commented on July 21, 2024

Fig now fully supports Alacritty by default!

Run fig install --input method and follow the instructions to set it up.

from fig.

laffed avatar laffed commented on July 21, 2024

fig install --input-method

from fig.

digika-ding avatar digika-ding commented on July 21, 2024

fig install --input-method is not working for me. Popup appears, but does not enable completions in alacritty

me too
OS: Ventrua 13.0.1
fig: 2.9.0
alacritty: 0.11.0

from fig.

mschrage avatar mschrage commented on July 21, 2024

The new command is fig integrations install input-method

from fig.

chrisgrieser avatar chrisgrieser commented on July 21, 2024

The new command is fig integrations install input-method

Still not working. The installation popup does appear:

Pasted image 2022-12-06 20 41 44

but after confirmation, there is no new input method registered by macOS. And there are no autocompletions at all in alacritty, even after restart.

Dashboard shows everything looking good, fig doctor gives me this, even though I have selected alacritty as my preferred terminal in the settings.

? Terminal support: Unsupported terminal, if you believe this is a mistake or would like to see support for your terminal, run `fig issue`
  __CFBundleIdentifier: <not-set>

from fig.

brendanfalk avatar brendanfalk commented on July 21, 2024

@chrisgrieser This is a big ask, but have you tried restarting your computer? This usually fixes input method issues. The problem is with Apple. We do our best, but Apple's implementation of input method is known to be very finicky.

from fig.

digika-ding avatar digika-ding commented on July 21, 2024

@brendanfalk
After reboot my mac still not working.

from fig.

chrisgrieser avatar chrisgrieser commented on July 21, 2024

This is a big ask, but have you tried restarting your computer?

not that big an ask, all good!

I also tired restarting afterwards, and nothing changes, still not autocompletion, still nothing that has been added as input method

from fig.

chrisgrieser avatar chrisgrieser commented on July 21, 2024

ah, I just found something:
Fig autocompletion works if you are launching alacritty via the Alacritty.app. It does not work if you launch alacritty via some app that calls the alacritty binary.

Unfortunately, you cannot simply replace the latter with the former, since the binary supports options like --working-directory to launch alacritty in a certain directory, something you cannot do with the Alacritty.app

from fig.

mschrage avatar mschrage commented on July 21, 2024

@chrisgrieser can you run env in an Alacritty session launched directly from the binary?

from fig.

Integralist avatar Integralist commented on July 21, 2024

Not going to open a new issue for this but will say that for the longest time fig has just not worked with Alacritty as far as the 'position' of the autocomplete menu. To be clear: I do get autocomplete but the drop-down is always miles away from the actual prompt on screen (see screenshot below for an example, see if you can find the autocomplete drop-down).

Screenshot 2022-12-08 at 09 22 21

from fig.

Integralist avatar Integralist commented on July 21, 2024

Oh, and that position was only from a few days ago. Before that, for the longest time (I honestly couldn't say how long exactly), the drop-down would appear on the far right-side of the screen (mostly top-right).

from fig.

digika-ding avatar digika-ding commented on July 21, 2024

Not going to open a new issue for this but will say that for the longest time fig has just not worked with Alacritty as far as the 'position' of the autocomplete menu. To be clear: I do get autocomplete but the drop-down is always miles away from the actual prompt on screen (see screenshot below for an example, see if you can find the autocomplete drop-down).

Screenshot 2022-12-08 at 09 22 21

@Integralist
Can you post your fig details?

from fig.

Integralist avatar Integralist commented on July 21, 2024

@digika-ding

Running fig doctor reports no issues, and running fig diagnostic reports:

fig-details:
  - 2.9.0-beta.5
hardware-info:
  - model: 
  - model-id: 
  - chip-id: Apple M1 Pro
  - cores: 8
  - mem: 16.00 GB
os-info:
  - macOS 13.0.1 (22A400)
environment:
  - shell: /opt/homebrew/Cellar/zsh/5.9/bin/zsh
  - terminal: alacritty
  - cwd: /Users/integralist/Code/test-projects/testing-cli-projects
  - exe-path: /Users/integralist/.fig/bin/fig
  - install-method: unknown
  - env-vars:
    - DISPLAY: /private/tmp/com.apple.launchd.F66qL9mL1l/org.xquartz:0
    - FIGTERM_SESSION_ID: 1424db57-596c-44f6-ad33-6094494ecb2a
    - FIG_HOSTNAME: D3496LK9V7
    - FIG_PID: 13615
    - FIG_SET_PARENT: 1424db57-596c-44f6-ad33-6094494ecb2a
    - FIG_SET_PARENT_CHECK: 1
    - FIG_TERM: 2.9.0-beta.5
    - PATH: /Users/integralist/.yarn/bin:/Users/integralist/.config/yarn/global/node_modules/.bin:/Users/integralist/.goenv/versions/1.18.5/bin:/Users/integralist/.goenv/bin:/Users/integralist/Library/Caches/fnm_multishells/13747_1670491302573/bin:/Users/integralist/bin:/opt/homebrew/opt/ruby/bin:/Users/integralist/.cargo/bin:/Users/integralist/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/integralist/.yarn/bin:/Users/integralist/.config/yarn/global/node_modules/.bin:/Users/integralist/.goenv/shims:/Users/integralist/Library/Caches/fnm_multishells/1241_1669889671084/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/integralist/.fig/bin:/Users/integralist/.local/bin:/opt/homebrew/opt/fzf/bin:/Users/integralist/go/1.18.5/bin
    - SHELL: /opt/homebrew/bin/zsh
    - TERM: xterm-256color
    - __CFBundleIdentifier: io.alacritty

from fig.

digika-ding avatar digika-ding commented on July 21, 2024

@Integralist

@digika-ding

Running fig doctor reports no issues, and running fig diagnostic reports:

fig-details:
  - 2.9.0-beta.5
hardware-info:
  - model: 
  - model-id: 
  - chip-id: Apple M1 Pro
  - cores: 8
  - mem: 16.00 GB
os-info:
  - macOS 13.0.1 (22A400)
environment:
  - shell: /opt/homebrew/Cellar/zsh/5.9/bin/zsh
  - terminal: alacritty
  - cwd: /Users/integralist/Code/test-projects/testing-cli-projects
  - exe-path: /Users/integralist/.fig/bin/fig
  - install-method: unknown
  - env-vars:
    - DISPLAY: /private/tmp/com.apple.launchd.F66qL9mL1l/org.xquartz:0
    - FIGTERM_SESSION_ID: 1424db57-596c-44f6-ad33-6094494ecb2a
    - FIG_HOSTNAME: D3496LK9V7
    - FIG_PID: 13615
    - FIG_SET_PARENT: 1424db57-596c-44f6-ad33-6094494ecb2a
    - FIG_SET_PARENT_CHECK: 1
    - FIG_TERM: 2.9.0-beta.5
    - PATH: /Users/integralist/.yarn/bin:/Users/integralist/.config/yarn/global/node_modules/.bin:/Users/integralist/.goenv/versions/1.18.5/bin:/Users/integralist/.goenv/bin:/Users/integralist/Library/Caches/fnm_multishells/13747_1670491302573/bin:/Users/integralist/bin:/opt/homebrew/opt/ruby/bin:/Users/integralist/.cargo/bin:/Users/integralist/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/integralist/.yarn/bin:/Users/integralist/.config/yarn/global/node_modules/.bin:/Users/integralist/.goenv/shims:/Users/integralist/Library/Caches/fnm_multishells/1241_1669889671084/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/integralist/.fig/bin:/Users/integralist/.local/bin:/opt/homebrew/opt/fzf/bin:/Users/integralist/go/1.18.5/bin
    - SHELL: /opt/homebrew/bin/zsh
    - TERM: xterm-256color
    - __CFBundleIdentifier: io.alacritty

Thank you for your share. What's your alacritty version?

from fig.

Integralist avatar Integralist commented on July 21, 2024

Don't get me wrong, it's not "great"...

Screenshot 2022-12-08 at 10 26 01

But it seems to correct itself when you keep typing...

Screenshot 2022-12-08 at 10 26 09

from fig.

Integralist avatar Integralist commented on July 21, 2024

Thank you for your share. What's your alacritty version?

0.10.1

I can see there is now 0.11.0 so I'm going to bump to that shortly too.

from fig.

digika-ding avatar digika-ding commented on July 21, 2024

Thank you for your share. What's your alacritty version?

0.10.1

I can see there is now 0.11.0 so I'm going to bump to that shortly too.

#2126
Maybe It's a bad idea to upgrade alacritty.

from fig.

chrisgrieser avatar chrisgrieser commented on July 21, 2024

@mschrage
here is the output of env from the Alacritty.app and from the binary
app.txt
binary.txt

from fig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.