diff --git a/.scripts/samples.js b/.scripts/samples.js index 6cd17063..f9f6aec0 100644 --- a/.scripts/samples.js +++ b/.scripts/samples.js @@ -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: [] }, diff --git a/lsp-log-streaming-sample/.vscode/settings.json b/lsp-log-streaming-sample/.vscode/settings.json index 040cd388..e46111f1 100644 --- a/lsp-log-streaming-sample/.vscode/settings.json +++ b/lsp-log-streaming-sample/.vscode/settings.json @@ -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 } \ No newline at end of file diff --git a/lsp-log-streaming-sample/README.md b/lsp-log-streaming-sample/README.md index daad3420..4fc3dedd 100644 --- a/lsp-log-streaming-sample/README.md +++ b/lsp-log-streaming-sample/README.md @@ -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) \ No newline at end of file + - `textDocument/publishDiagnostics` \ No newline at end of file diff --git a/lsp-log-streaming-sample/demo.gif b/lsp-log-streaming-sample/demo.gif new file mode 100644 index 00000000..bf3f5403 Binary files /dev/null and b/lsp-log-streaming-sample/demo.gif differ