mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
![]() 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> |
||
---|---|---|
.. | ||
lib | ||
LICENSE | ||
lsp_meta_model.json | ||
OWNERS | ||
pubspec.yaml | ||
README.md |
The language server protocol
The contents of LICENSE is are downloaded from:
https://microsoft.github.io/language-server-protocol/License-code.txt
The file lsp_meta_model.json is downloaded from: