mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 08:44:27 +00:00
2b713a9e4e
This adds support for serving the contents of virtual files to the client over a custom LSP protocol (based on the VS Code API of the same name). This is currently a custom Dart protocol but hopefully very close to something that could become standard LSP in future. If the client advertises support for this feature (currently with an experimental flag "supportsDartTextDocumentContentProviderEXP1") we will return the set of URI schemes we can provide content for (currently "dart-macro-file"). Additionally, we will map internal analyzer macro paths (like `/foo/bar.macro.dart`) onto that scheme (`dart-macro-file://foo/bar.dart`) instead of standard `file://` URIs. Overlays are not created for these kinds of files (because they would override the server-generated content). Some language functionality "just works" because we can get resolved ASTs for the macro files (and many LSP features operate on these), but more testing (and tests) are required. Included are tests for the virtual file methods (and events) and Go-to-Definition. Tests for other features are outstanding. Change-Id: I2056699652873a12b730f565b823f187f883a1ee Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345420 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com> |
||
---|---|---|
.. | ||
benchmark | ||
bin | ||
doc | ||
lib | ||
test | ||
tool | ||
analysis_options.yaml | ||
AUTHORS | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
OWNERS | ||
pubspec.yaml | ||
README.md |
analysis_server
A long-running process that provides analysis results to other tools.
The analysis server is designed to provide on-going analysis of one or more code bases as those code bases are changing.
Using the server
The analysis server is not intended to be used stand-alone, and therefore does not have a human-friendly user interface.
Clients (typically tools, such as an editor) are expected to run the analysis
server in a separate process and communicate with it using a JSON protocol. The
original protocol is specified in the file analysis_server/doc/api.html
and Language Server Protocol support is documented in
tool/lsp_spec/README.md
.
Features and bugs
Please file feature requests and bugs at the issue tracker.