-
Notifications
You must be signed in to change notification settings - Fork 234
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
add web support #594
add web support #594
Conversation
@aeschli could you please fix the conflicts? |
@fbricon merged... |
@aeschli Could you update PR once more? Sorry for delay, I will review this PR ASAP. |
Co-authored-by: Yevhen Vydolob <[email protected]>
Co-authored-by: Yevhen Vydolob <[email protected]>
@evidolob Merged one more time... |
great job @aeschli ! |
@aeschli I have been following the instructions above to get vscode-yaml web-extension in chromium and in extension-debug-mode . After linking the Running The How can I get this web-extension working? |
Sorry I don't have time to look into this in detail. Too suggestions
|
Hi vscode-yaml team!
I'm part of the VS Code team. We recently launched VS Code for the web with github.dev!
In VS Code for the web, both UI and extension host run inside the browser. The web extension guide describes what extensions need to do to run in the web extension host.
vscode-yaml was one of our test cases, and this PR shows how we got it to run. I hope you are interested to adopt.
Most importantly, LSP can now also run in the browser. See the LSP paragraph in the web extension guide and lsp-web-extension-sample for the details.
The changes I made:
changes to the server:
vscode.workspace.fs
changes to the client
scr/extension.ts
to work in both webworker and node. It could now be renamed to yamlClientCommon, but I kept the name to make code reviewing easier. There are new main filesnode/yamlClientMain
andwebworker/yamlClientMain
which pass in some abstractions to the common code: telemetry and schemaCacheadded webpack file that packages the client and the server. Packaging is needed for web extensions as loading modules is not supported
To try it out:
yarn
yarn link yaml-language-server
)Launch Web Extension
. This will open a reguar VS Code Desktiop but with the Yaml extension running in a web worker. To verify this, open a yaml file, run commandShow Running Extensions
and verify that it saysweb worker
next toredhat.vscode-yaml
yarn run-in-chromium
Let me know if you have any questions or need help.