dart-sdk/pkg/analyzer_plugin
Danny Tuppeny 4d9c40860f [analysis_server] Add support for LSP Document Links for example/api links
This extracts the code that finds "examples/api" paths in code from the navigation code so that it can be re-used by LSP's DocumentLink request.

This allows the links to be more visible in the editor (they are underlined and clearly clickable like hyperlinks, whereas definition required you to hover and hold Ctrl before you'd seen an underline in VS Code).

Example: https://github.com/Dart-Code/Dart-Code/assets/1078012/be9db467-dbc9-4206-9dd5-f8ca72d95596

There may be an argument for making this more general (so that links other than example/api could be detected) but for now the goal was to make these existing links more obvious.

Fixes https://github.com/Dart-Code/Dart-Code/issues/4186

Change-Id: Id00425175b24394e565e13406ea4bac5691d2c72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333082
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-11-02 15:51:49 +00:00
..
doc Extension type. Tests for type hierarchy. 2023-08-30 21:18:25 +00:00
lib [analysis_server] Add support for LSP Document Links for example/api links 2023-11-02 15:51:49 +00:00
test [deps] roll package:lints to the latest 2023-10-05 03:36:59 +00:00
tool/spec [deps] roll package:lints to the latest 2023-10-05 03:36:59 +00:00
.gitignore pkg/analyzer_plugin: support the latest pkg:analyzer 2019-04-24 02:26:26 +00:00
analysis_options.yaml Enable new linter rules in analyzer packages 2022-11-21 23:02:38 +00:00
CHANGELOG.md Prepare analyzer_plugin 0.11.3 2023-08-02 19:37:58 +00:00
LICENSE Update LICENSE 2021-04-07 10:28:38 +00:00
OWNERS [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00
pubspec.yaml Prepare analyzer_plugin 0.11.3 2023-08-02 19:37:58 +00:00
README.md [pkg] normalize the headers of the pkg/ readmes 2022-05-31 21:00:13 +00:00

pub package package publisher

A framework for building plugins for the analysis server.

Usage

Note: The plugin support is not currently available for general use.

Plugins are written in Dart and are run in the same VM as the analysis server. The analysis server runs each plugin in a separate isolate and communicates with the plugin using a plugin API. This API is similar to the API used by the analysis server to communicate with clients.

Plugins are automatically discovered and run by the analysis server.

This package contains support code to make it easier to write a plugin. There is a tutorial describing how to use the support in this package.

Support

Post issues and feature requests on the issue tracker.

Questions and discussions are welcome at the Dart Analyzer Discussion Group.

License

See the LICENSE file.