Repository navigation
Integrate Fig with Windows聽#35
Description
Activity
- addedtype:integration-requestRequest for an intergration with an existing toolRequest for an intergration with an existing tool
on Apr 8, 2021 - changed the title
[-][INTEGRATION] Integrate Fig with Windows[/-][+]Integrate Fig with Windows[/+]on Apr 8, 2021 super work
Reacted by Gabe O'Leary, Sung Jeon, mc-marcocheng, Shahzeb Parkar and EpikReacted by Shubham SharmaCommenting to get updates - it's really useful, I hope to see a Windows release soon!
you could just click on the 'watch' button at the top
Reacted by aeongdesu, Nathan and Bo LingenI can hardly wait!
Reacted by Armaan Aggarwal, aeongdesu, Vitaly, Harry Bayliss, Angel Lambertt Pierra and Raghib ShahriyerMaybe the best approach for this one is trying to write an app like https://github.com/microsoft/terminal/tree/main/samples that consumes the new Windows Console APIs.
Support for zsh/bash/fish first via WSL and Windows Console APIs could be a good MVP. Powershell in MVP 2.Reacted by Matt Schrage, seIIers, Abdul Ghani, Khyber Sen, Luan and senedmHey everyone! Thank you for your patience. We are super excited about bringing Fig to Windows, but there is lots of work to do before this is possible.
There are at least 7 core functions that need to be built out in order for us to release autocomplete to Windows.
- We need to be able to determine the location of the cursor in a 3rd party app.
This seems possible using Microsoft Active Accessibility APIs.
Other Resources
- We need to be able to determine what you've typed in the terminal
This means porting our pseudoterminal layer (
figterm) to Window. We need to do some research to understand how this should work on a non-UNIX system.
See ConPTY-
We need to do IPC between our CLI tools and our GUI app. On macOS (and Linux) we use UNIX domain sockets. I am not sure about the equivalent on Windows.
-
We need to be able to position a 'floating' window overlay on top of 3rd party applications.
-
We need intercept certain keystrokes to prevent them from being handled by the shell. This can be implemented at the OS level or potentially at the pseudoterminal level.
-
We need to port over the
Fig.jsAPI to Windows. This is the subsystem that links our TypeScript autocomplete engine with native OS functionality. -
We need to install our shell integrations. This entails research & experimentation with how shells work on Windows. eg. What is the difference between
Cygwin,MSYS/MinGW,git bashand WSL? Which should we support? Where arebashrcandbash_profileequivalents located?
See "How can I use a bash-like shell on Windows" for more details.
Also: "Launching a daemon from WSL"If you have any insight on how to solve these challenges, please comment below or join our #cross-platform channel on Discord. 鉂わ笍
Reacted by Gabe O'Leary, Alisa, Shahzeb Parkar, Armaan Aggarwal, Shubham Sharma, JJ Adonis, Yann Lugrin, Lioness100, aeongdesu, Valentine Briese and 11 moreReacted by mc-marcocheng, Florian Lefebvre, Shahzeb Parkar, JJ Adonis, Lioness100, Valentine Briese, Jake, Toxic-87, Matt Schrage, Angel Lambertt Pierra and 1 more@mschrage
I think UNIX domain sockets are available on Windows: https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/
I don't know if the implementation is more complete nowadays or if it's still lacking the missing features mentioned in the linked article. I also don't know which features you need so the implementation might be enough for your usecase.Reacted by Matt Schrage, Sung Jeon and Abdul GhaniI think winpty could be a great starting point for pseudo-console implementation. It is known to work well with other UNIX-like software as well.
Reacted by Matt Schrage and Abdul GhaniRegarding #1 in the list above, it may be worthwhile to add native support to windows terminal rather than have it be an accessibility hack
Reacted by Sung Jeon, Ayrton and Fredrik Pettersen@levrik I didn't know about that Windows had added support for
AF_UNIXsocket networking. That's awesome.@BasixKOR I will look into
winpty! Our pseudoterminal is written in Rust, so we'll need to figure the right approach / library.@ntindle does Windows Terminal have support for GUI plugins like Fig? If you have any links to documentation on this or thoughts on how to implement native support, please let me know.
Reacted by Sung Jeon and Abdul GhaniI understand that Windows terminal support is not done yet, but I'm a bit confused about vscode on Windows, because your README writes that it works on vscode terminal. I assume it only works on vscode terminal on MacOS, right?
Here's the master feature list for extensions on Windows Terminal.
As far as I can tell, the command palette is fully extensible but doesn't provide the sort of inline support you're probably looking for. They seem very open to feature requests though
Reacted by Matt Schrage, Abdul Ghani and Khyber SenThe "Hyper" terminal from Vercel runs on Windows as well as MacOS. It'd be great to see Fig work with Hyper on Windows 11, at least, even if Windows Terminal integration doesn't work yet.
Reacted by Noah, Andria, Abdul Ghani and Khyber SenReacted by Noah14 remaining items
@levrik Looking at the executable icon, it's a tauri app (https://github.com/tauri-apps/tauri) so yes it's built with Rust.
Good eye @florian-lefebvre!
@levrik To answer your question: yes, we use Rust! 馃
Reacted by Levin Rickert and Pavel Su拧ick媒@mschrage And few hours later I received your newsletter mentioning usage of Rust for at least your CLI 馃槄
Reacted by Matt SchrageFig looks very interesting, would be great to see this working with PuTTY on Windows too.
Could we please keep the comments here limited to the issue and move other comments to a discussion? I'd like to stay connected with progress to Fig coming to Windows, but notifications like these last few can be very noisy.
Reacted by Luke Kelly, Tim Geerts, Ionu葲 Botizan, Daniel Marshall, digeomel, Jos茅 Guilherme Paro Monteiro Tomaine, Sveeene, Shachar Zidon, Milo, Sanjay Soundarajan and 13 moreReacted by Luke Kelly, digeomel, Shachar Zidon, Sanjay Soundarajan, Tiago Boeing, Matt Schrage, Sean Sullivan, Matthijs, Radu Vasile Catalin and SasialCould we lock this issue to the fig team only (for updates) and then create a discussion post for this issue for discussion on it?
Good idea @sasial-dev and thanks for moving the conversation in a more constructive direction @haltcase.
I鈥檒l lock this issue for now.
- locked and limited conversation to collaborators
on Apr 2, 2022 The team just hit another milestone!
windows_demo.mp4
This is a really rough version of autocomplete running on Windows. Still more work to be done, but we're getting there! 馃檶
- pinned this issue
on Jun 22, 2022 We're rolling out a closed alpha/prototype of Fig on Windows to a few users in the next week or so -- if you're on Windows and interested in getting early access, fill out the typeform here: https://withfig.typeform.com/to/n58Z7ciy
- unpinned this issue
on Jun 10, 2024
Fig currently works on macOS only. We will build a port that integrates with Windows soon.
Please subscribe to this issue to get an update when Fig's autocomplete integration with the Window is ready 馃槃