Redocly / redocly-vs-code

Redocly VS Code extension
37 stars 8 forks source link

Get VS Code extension available in online editors #34

Open tatomyr opened 2 years ago

tatomyr commented 2 years ago

What should we improve?

At the moment, our extension isn't working in online editors. However, Github Codespaces is essentially a an online VS Code emulator, so it should support using our extension.

How should we improve it?

Describe alternatives you've considered

None

Additional context

See this article for more details on developing extensions for Github Codespaces.

tatomyr commented 2 years ago

Here is the general info about extensions in vscode-web.

According to this guide a web extension should have "browser" field defined in package.json (alongside "main" field). This should enable the extension in https://vscode.dev/ environment.

Here is the list of requirements to the web extension. We already cover most of them. However, we have to substitute process and path global variables; file system API should go through vscode.workspace.fs; use browser version of Language Server Protocol.

tatomyr commented 2 years ago

It appears it could be tested locally with --extensionDevelopmentKind=web flag. See more details here.

roman-sainchuk commented 2 years ago

Here are some details about testing web extension before publishing.

roman-sainchuk commented 2 years ago

We made language server browser-compatible and moved it to separate repository