vscode-wasi-pygls [](https://marketplace.visualstudio.com/items?itemName=swyddfa.pygls-wasi-playground)

November 8, 2024 ยท View on GitHub

A screenshot showing an example pygls language server running on vscode.dev via the WASI host.

Usage

It is possible to use this extension in a local version of VSCode however, its primary purpose is to demonstrate that it is possible to run a language server written with pygls entirely in the browser!

  • Open https://vscode.dev/github/openlawlibrary/pygls, you will need to sign into GitHub before the repository's content will load.
  • Install the swyddfa.pygls-wasi-playground extension
  • By default, the extension will be configured to launch the examples/servers/code_action.py server, though this can be changed by setting the pygls.server.launchScript option.
  • Open the examples/servers/workspace/sums.txt file
  • Wait for the server to boot up (will take 2-3min to load all the required resources over the network)

This extension is a WASI port of the pygls-playground extension from the upstream project, see the documentation for more details on its usage. Note that some features (like debugging!) have not yet been implemented.

Acknowledgements

This stands on the shoulders of a lot of excellent projects and resources, without which this would be impossible.

Projects

Resources