Update lsp-log-streaming-sample

This commit is contained in:
Pine Wu
2018-10-23 22:25:13 -07:00
parent 140ebceff9
commit 1b2bb82a2f
4 changed files with 14 additions and 15 deletions

View File

@ -43,7 +43,13 @@ const samples = [
{ description: 'hellocode-sample', path: 'hellocode-sample', guide: null, apis: [], contributions: [] },
{ description: 'i18n-sample', path: 'i18n-sample', guide: null, apis: [], contributions: [] },
{ description: 'legacy-samples', path: 'legacy-samples', guide: null, apis: [], contributions: [] },
{ description: 'lsp-log-streaming-sample', path: 'lsp-log-streaming-sample', guide: null, apis: [], contributions: [] },
{
description: 'lsp-log-streaming-sample',
path: 'lsp-log-streaming-sample',
guide: null,
apis: [],
contributions: []
},
{ description: 'lsp-multi-server-sample', path: 'lsp-multi-server-sample', guide: null, apis: [], contributions: [] },
{ description: 'lsp-sample', path: 'lsp-sample', guide: null, apis: [], contributions: [] },
{ description: 'multi-diagnostics-sample', path: 'multi-diagnostics-sample', guide: null, apis: [], contributions: [] },

View File

@ -1,12 +1,3 @@
{
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
"typescript.tsdk": "./node_modules/typescript/lib",
"typescript.tsc.autoDetect": "off",
"npm.exclude": ["**/client", "**/server"],
"npm.enableScriptExplorer": true
"editor.insertSpaces": false
}

View File

@ -5,6 +5,10 @@ This is a repository adapted from [lsp-sample](https://github.com/Microsoft/vsco
- Usage of the JSON output
- Streaming the JSON into [LSP Inspector](https://github.com/Microsoft/language-server-protocol-inspector)
## Demo
![demo](demo.gif)
## Synopsis
- With `vscode-languageclient@5.1.0-next.9`, you can specify a JSON log output format with `[langId].trace.server` as follows:
@ -18,7 +22,7 @@ This is a repository adapted from [lsp-sample](https://github.com/Microsoft/vsco
- When using the Webview LSP Inspector, it will open a WebSocket Server taking incoming connection that sends logs following [this format](https://github.com/Microsoft/language-server-protocol-inspector#log-format).
- You can stream the JSON log of any Language Server using `vscode-languageclient` to the LSP Inspector, and it will show a live view of the LSP connection.
## Usage
## Running the Sample
- Install the [LSP Inspector Webview](https://marketplace.visualstudio.com/items?itemName=octref.lsp-inspector-webview) extension
- Compile and Run this Extension
@ -38,6 +42,4 @@ This is a repository adapted from [lsp-sample](https://github.com/Microsoft/vsco
- As you are typing, doing auto-completion, many messages should show up in the inspector, such as
- `textDocument/didChange`
- `textDocument/completion`
- `textDocument/publishDiagnostics`
![stream](https://user-images.githubusercontent.com/4033249/45078686-7a22e600-b0a5-11e8-9c75-0d0dc3ec8256.gif)
- `textDocument/publishDiagnostics`

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 MiB