Add DocumentLink.tooltip api proposal

For #72824
This commit is contained in:
Matt Bierner
2019-05-23 17:51:45 -07:00
parent 5b9869eb02
commit f3b8d15b0d
10 changed files with 62 additions and 13 deletions

View File

@@ -996,6 +996,7 @@ export interface LinkDto {
cacheId?: ChainedCacheId;
range: IRange;
url?: string | UriComponents;
tooltip?: string;
}
export interface CodeLensDto extends ObjectIdentifier {

View File

@@ -808,7 +808,8 @@ export namespace DocumentLink {
export function from(link: vscode.DocumentLink): modes.ILink {
return {
range: Range.from(link.range),
url: link.target
url: link.target,
tooltip: link.tooltip
};
}

View File

@@ -1440,6 +1440,8 @@ export class DocumentLink {
target?: URI;
tooltip?: string;
constructor(range: Range, target: URI | undefined) {
if (target && !(target instanceof URI)) {
throw illegalArgument('target');