Skip to content

Commit

Permalink
Update LSP docs to use the "dart language-server" command
Browse files Browse the repository at this point in the history
Change-Id: Ia8c948e088c2fe8c8f4fa79e43859aa4755f0bab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219784
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
  • Loading branch information
DanTup authored and commit-bot@chromium.org committed Nov 9, 2021
1 parent 445ac5d commit c224cc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/analysis_server/tool/lsp_spec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

## Running the Server

The analysis server snapshot is included in the `bin/snapshots` folder of the Dart SDK. Pass the `--lsp` flag to start the server in LSP mode and the `--client-id` and `--client-version` flags to identify your editor/plugin and version:
Start the language server using the `dart language-server` command. Pass the `--client-id` and `--client-version` flags to identify your editor/plugin and version:

```
dart bin/snapshots/analysis_server.dart.snapshot --lsp --client-id my-editor.my-plugin --client-version 1.2
dart language-server --client-id my-editor.my-plugin --client-version 1.2
```

Note: In LSP the client makes the first request so there is no obvious confirmation that the server is working correctly until the client sends an `initialize` request. Unlike standard JSON RPC, [LSP requires that headers are sent](https://microsoft.github.io/language-server-protocol/specification).
Expand Down

0 comments on commit c224cc2

Please sign in to comment.