Refs: #11847
Complexity: 3
We proposed an API to add link to diagnostics:
export interface Diagnostic {
/**
* Will be merged into `Diagnostic#code`
*/
code2?: {
/**
* A code or identifier for this diagnostic.
* Should be used for later processing, e.g. when providing [code actions](#CodeActionContext).
*/
value: string | number;
/**
* A link to a URI with more information about the diagnostic error.
*/
link: Uri;
}
}
The link is rendered in hover, inline error (F8) and problems panel.
You should be able to single-click to open links to hover and inline error, and cmd/alt click to open links in problems panel. We do this so you can still single click any region in problems panel to go to the errors in editor.
Write an extension that uses this proposed API, test that:
- The API and its description all makes sense
- The rendering / behavior or these links are consistent and make sense
- The links are colored like other links, and themed accordingly
- The links are protected by the link protection mechanism
Setup:
Refs: #11847
Complexity: 3
We proposed an API to add link to diagnostics:
The link is rendered in hover, inline error (F8) and problems panel.
You should be able to single-click to open links to hover and inline error, and cmd/alt click to open links in problems panel. We do this so you can still single click any region in problems panel to go to the errors in editor.
Write an extension that uses this proposed API, test that:
Setup: