mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
Update lsp-log-streaming-sample
This commit is contained in:
@ -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: [] },
|
||||
|
||||
11
lsp-log-streaming-sample/.vscode/settings.json
vendored
11
lsp-log-streaming-sample/.vscode/settings.json
vendored
@ -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
|
||||
}
|
||||
@ -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
|
||||
|
||||

|
||||
|
||||
## 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`
|
||||
|
||||

|
||||
- `textDocument/publishDiagnostics`
|
||||
BIN
lsp-log-streaming-sample/demo.gif
Normal file
BIN
lsp-log-streaming-sample/demo.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.4 MiB |
Reference in New Issue
Block a user