Files
vscode-extension-samples/lsp-web-extension-sample
dependabot[bot] 7995942836 Bump minimist from 1.2.5 to 1.2.6 in /lsp-web-extension-sample
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 18:34:33 +00:00
..
2021-11-13 20:16:10 +01:00
2022-02-28 13:45:21 -08:00
2022-02-28 13:45:21 -08:00
2021-09-15 23:30:24 +02:00
2021-07-21 18:13:58 +02:00
2021-07-21 18:13:58 +02:00
2021-07-21 18:13:58 +02:00
2021-07-21 18:13:58 +02:00
2022-02-22 17:36:07 +01:00
2021-07-21 18:13:58 +02:00

LSP web extension Example

A LSP server that runs in a web extension

Functionality

This Language Server add color decorators to plain text files.

  • create a plain text file
  • enter text that contains colors in hex format (#rrggbb)
  • color decorators

It also includes an End-to-End test.

Structure

.
├── client // Language Client
│   ├── src
│   │   └── browserClientMain.ts // Language Client entry point
├── package.json // The extension manifest.
└── server // Language Server
    └── src
        └── browserServerMain.ts // Language Server entry point

Running the Sample

  • Run npm install in this folder. This installs all necessary npm modules in both the client and server folder
  • Open VS Code on this folder.
  • Press Ctrl+Shift+B to compile the client and server.
  • Switch to the Debug viewlet.
  • Select Launch Client from the drop down.
  • Run the launch config.
  • If you want to debug the server as well use the launch configuration Attach to Server
  • In the [Extension Development Host] instance of VSCode, open a document in 'plain text' language mode.
    • Type #00ff00 or any other color in hex format
    • color decorators will appear