Files
vscode-extension-samples/lsp-embedded-request-forwarding/README.md

26 lines
1.1 KiB
Markdown
Raw Normal View History

2020-04-01 12:38:06 -07:00
# LSP Example for Embedded Language using Request Forwarding
2020-03-25 12:01:54 -07:00
2020-04-01 12:38:06 -07:00
Heavily documented sample code for https://code.visualstudio.com/api/language-extensions/embedded-languages#request-forwarding
2020-03-25 12:01:54 -07:00
## Functionality
2020-04-07 12:47:46 -07:00
This extension contributes a new language, `html1`. The new language is for illustration purpose and has basic syntax highlighting.
2021-09-16 20:23:10 +08:00
This Language Server works for `html1` file. HTML1 is like HTML file but has file extension `.html1`. You can create a `test.html1` file to play with below functionalities:
2020-04-07 12:47:46 -07:00
2020-04-01 12:38:06 -07:00
- Completions for HTML
- Completions for CSS in `<style>` tag
2020-03-25 12:01:54 -07:00
## 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`
2020-04-01 12:38:06 -07:00
- In the [Extension Development Host] instance of VSCode, open a HTML document
- Type `<d|` to try HTML completion
2021-09-16 20:23:10 +08:00
- Type `<style>.foo { c| }</style>` to try CSS completion