4/19/2022Announcements
← Back to posts

Fig now supports JetBrains IDEs

Matt Schrage

To download Fig on macOS run brew install --cask fig or direct download at fig.io

I'm excited to announce that starting in version 1.0.57, Fig now supports over a dozen new terminals and IDEs:

  • IntelliJ IDEA
  • PyCharm
  • AppCode
  • GoLand
  • Rider
  • WebStorm
  • PhpStorm
  • CLion
  • RubyMine
  • Android Studio
  • WezTerm
  • Alacritty
  • Kitty
  • Tabby
  • Nova

Fig working in Intellij

If we're missing a terminal or IDE that you'd like to use Fig with, please create a new issue on GitHub.

How to set up

  1. Download Fig from fig.io or brew install fig
  2. Run the following command:
fig install --input-method

Note that you will be asked to restart your computer for the changes to take effect

How it works

Determing the location of the cursor in a 3rd party application is a suprisingly tricky problem. Modern operating systems do their best to isolate applications from one another. In order, to figure out where to position the autocomplete window, we've had to explore many unusual APIs.

On macOS, Fig has always used the accessibility API to determine the position of the caret in supported terminals. This approach worked for native terminal emulators, like iTerm and Apple Terminal, and xterm.js based emulators like, VSCode & Hyper.

However, certain applications -- particularly those not built using native macOS user interface frameworks -- did not expose this information to screen readers. The limitations in the adoption of the accessibility API forced us to be creative. And ultimately led us to look into input methods on macOS.

If you've ever typed non-Latin characters on your computer (particularly CJK characters), you've used an input method before. It allows Apple (as well as a few intrepid 3rd party developers) to provide an inline interface for suggesting characters... that works across any application.

CJK input method

Support for input methods is baked in to almost all cross-platform UI frameworks, however building an Input Method for macOS is underdocumented to say the least. Many crucial details live only in public C Header files for obscure Apple frameworks.

There are plenty of technical rabbit holes to go down, but I'll leave those for another blog post.

Why we're excited

A JetBrains integration has been one of the most requested features since we launched Fig.

Fig aims to work in every terminal out there: standalone terminals (like iTerm2 or Hyper), terminals inside IDEs (like JetBrains or VSCode), and even the terminals inside cloud IDEs (like GitHub codespaces). No matter where you're working, Fig will always be there with you. ❤️

Tags
announcementterminalinput-methodintegrationsmacos