Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Browser Git and LSP support #781

Open
abose opened this issue Dec 24, 2022 · 0 comments
Open

In Browser Git and LSP support #781

abose opened this issue Dec 24, 2022 · 0 comments
Labels
core Core features enhancement New feature or request

Comments

@abose
Copy link
Member

abose commented Dec 24, 2022

Until Dec 2022, we were working hard to bring phcode.dev to the browser with feature parity with brackets core. Now that phcode has been marked stable and feature parity attained(barring extension marketplace), we move to the second stage of the effort to bring in advanced code intelligence features and git support to web natively.

Phoenix is a browser-based code editor, and the current technology landscape presents challenges to enabling the below two features in a pure browser-based code editor:

  1. Feature request Full support fot GIT in Browser #145
  2. language server support in the browser. #27

While the above two are straightforward to do if node is available, it is extremely hard to do in a pure browser-based setting. The aim of this issue is to bring in first-class support for the above two workflows in the browser purely on the client side without any server/nodejs support.

Please click on the issue links to see more details.

Git support in the browser

Pheonix should support all features of GIT in the Browser without backed support. Brackets earlier had brackets-git extension that requires node runtime and git installed. But this will not work for Phoenix as client side web is the main target for Phoenix IDE. See the available technologies section below for options.

Phoenix is based on a virtual file system that presents a UNIX-like file system to the browser backed by indexedDB or fs access API. The filesystem is exposed by a nodejs fs like library that is partially compliant to node fs lib. This virtual filesystem presents as as single unified file system available within all contexts(main thread, workers, service workers). As it is backed by indexed db, it presents full support for change watchers across are js contexts in the same domain. The phoenix Virtual File system is the first of its kind to expose a node-js like fs API over the new fs access API. This abstracts out the tree like fs access APIs to a more conventional /path/based/api that is easier to work with. What is more convenient is that the same path is valid across all browsing context if an fs access path is mounted in any one of the tabs.

We need to thread this virtual file system to the isomorphic git library to make Git work in the browser in Phoenix IDE.

language server support in the browser.

Language server support is essential for the future of phcode.dev. Language servers brings in code auto completion and advanced code assistance features inside phoenix. Almost all implementations currently in existence require node and the few that work in the browser(ts language server) run only in vscode.dev.

We should find a way to browserify popular language servers in pure browser-based environments. This will help web-based code editors like us and others to provide advanced IDE-like features in the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core features enhancement New feature or request
Development

No branches or pull requests

1 participant