From e4eaed4bf55468a785eb35790653599178c16dd2 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 3 Aug 2021 16:37:07 -0700 Subject: [PATCH] Add support for rendering `@linkcode` jsdoc tags as code --- .../src/test/unit/previewer.test.ts | 44 ++- .../src/utils/previewer.ts | 20 +- src/vs/vscode.d.ts | 284 +++++++++--------- src/vs/vscode.proposed.d.ts | 2 +- 4 files changed, 200 insertions(+), 150 deletions(-) diff --git a/extensions/typescript-language-features/src/test/unit/previewer.test.ts b/extensions/typescript-language-features/src/test/unit/previewer.test.ts index 514bb3ea6eba9..040ffcfef6675 100644 --- a/extensions/typescript-language-features/src/test/unit/previewer.test.ts +++ b/extensions/typescript-language-features/src/test/unit/previewer.test.ts @@ -5,8 +5,9 @@ import * as assert from 'assert'; import 'mocha'; +import { SymbolDisplayPart } from 'typescript/lib/protocol'; import { Uri } from 'vscode'; -import { IFilePathToResourceConverter, markdownDocumentation, tagsMarkdownPreview } from '../../utils/previewer'; +import { IFilePathToResourceConverter, markdownDocumentation, plainWithLinks, tagsMarkdownPreview } from '../../utils/previewer'; const noopToResource: IFilePathToResourceConverter = { toResource: (path) => Uri.file(path) @@ -85,5 +86,46 @@ suite('typescript.previewer', () => { ], noopToResource), '*@param* `parámetroConDiacríticos` — this will not'); }); + + test('Should render @linkcode symbol name as code', async () => { + assert.strictEqual( + plainWithLinks([ + { "text": "a ", "kind": "text" }, + { "text": "{@linkcode ", "kind": "link" }, + { + "text": "dog", + "kind": "linkName", + "target": { + "file": "/path/file.ts", + "start": { "line": 7, "offset": 5 }, + "end": { "line": 7, "offset": 13 } + } + } as SymbolDisplayPart, + { "text": "}", "kind": "link" }, + { "text": " b", "kind": "text" } + ], noopToResource), + 'a [`dog`](file:///path/file.ts#L7%2C5) b'); + }); + + test('Should render @linkcode text as code', async () => { + assert.strictEqual( + plainWithLinks([ + { "text": "a ", "kind": "text" }, + { "text": "{@linkcode ", "kind": "link" }, + { + "text": "dog", + "kind": "linkName", + "target": { + "file": "/path/file.ts", + "start": { "line": 7, "offset": 5 }, + "end": { "line": 7, "offset": 13 } + } + } as SymbolDisplayPart, + { "text": "husky", "kind": "linkText" }, + { "text": "}", "kind": "link" }, + { "text": " b", "kind": "text" } + ], noopToResource), + 'a [`husky`](file:///path/file.ts#L7%2C5) b'); + }); }); diff --git a/extensions/typescript-language-features/src/utils/previewer.ts b/extensions/typescript-language-features/src/utils/previewer.ts index ae57ec20a51f5..dfa29ee051bc4 100644 --- a/extensions/typescript-language-features/src/utils/previewer.ts +++ b/extensions/typescript-language-features/src/utils/previewer.ts @@ -127,36 +127,40 @@ function convertLinkTags( const out: string[] = []; - let currentLink: { name?: string, target?: Proto.FileSpan, text?: string } | undefined; + let currentLink: { name?: string, target?: Proto.FileSpan, text?: string, readonly linkcode: boolean } | undefined; for (const part of parts) { switch (part.kind) { case 'link': if (currentLink) { - const text = currentLink.text ?? currentLink.name; if (currentLink.target) { const link = filePathConverter.toResource(currentLink.target.file) .with({ fragment: `L${currentLink.target.start.line},${currentLink.target.start.offset}` }); - out.push(`[${text}](${link.toString()})`); + const linkText = currentLink.text ? currentLink.text : escapeMarkdownSyntaxTokensForCode(currentLink.name ?? ''); + out.push(`[${currentLink.linkcode ? '`' + linkText + '`' : linkText}](${link.toString()})`); } else { + const text = currentLink.text ?? currentLink.name; if (text) { if (/^https?:/.test(text)) { const parts = text.split(' '); if (parts.length === 1) { out.push(parts[0]); } else if (parts.length > 1) { - out.push(`[${parts.slice(1).join(' ')}](${parts[0]})`); + const linkText = escapeMarkdownSyntaxTokensForCode(parts.slice(1).join(' ')); + out.push(`[${currentLink.linkcode ? '`' + linkText + '`' : linkText}](${parts[0]})`); } } else { - out.push(text); + out.push(escapeMarkdownSyntaxTokensForCode(text)); } } } currentLink = undefined; } else { - currentLink = {}; + currentLink = { + linkcode: part.text === '{@linkcode ' + }; } break; @@ -217,3 +221,7 @@ export function addMarkdownDocumentation( } return out; } + +function escapeMarkdownSyntaxTokensForCode(text: string): string { + return text.replace(/`/g, '\\$&'); +} diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index b3dde9d781c4c..4c57fa7fcc08c 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -106,7 +106,7 @@ declare module 'vscode' { /** * Is this document representing an untitled file which has never been saved yet. *Note* that - * this does not mean the document will be saved to disk, use {@link Uri.scheme `uri.scheme`} + * this does not mean the document will be saved to disk, use {@linkcode Uri.scheme} * to figure out where a document will be {@link FileSystemProvider saved}, e.g. `file`, `ftp` etc. */ readonly isUntitled: boolean; @@ -214,7 +214,7 @@ declare module 'vscode' { * if it does, it will be ignored. * * *Note 2:* A custom regular expression will fail to match multiline strings * and in the name of speed regular expressions should not match words with - * spaces. Use {@link TextLine.text `TextLine.text`} for more complex, non-wordy, scenarios. + * spaces. Use {@linkcode TextLine.text} for more complex, non-wordy, scenarios. * * The position will be {@link TextDocument.validatePosition adjusted}. * @@ -755,7 +755,7 @@ declare module 'vscode' { * An optional view column in which the {@link TextEditor editor} should be shown. * The default is the {@link ViewColumn.Active active}, other values are adjusted to * be `Min(column, columnCount + 1)`, the {@link ViewColumn.Active active}-column is - * not adjusted. Use {@link ViewColumn.Beside `ViewColumn.Beside`} to open the + * not adjusted. Use {@linkcode ViewColumn.Beside} to open the * editor to the side of the currently active one. */ viewColumn?: ViewColumn; @@ -1366,7 +1366,7 @@ declare module 'vscode' { * * The resulting string shall *not* be used for display purposes but * for disk operations, like `readFile` et al. * - * The *difference* to the {@link Uri.path `path`}-property is the use of the platform specific + * The *difference* to the {@linkcode Uri.path path}-property is the use of the platform specific * path separator and the handling of UNC paths. The sample below outlines the difference: * ```ts const u = URI.parse('file://server/c$/folder/file.txt') @@ -1884,7 +1884,7 @@ declare module 'vscode' { value?: string; /** - * Selection of the prefilled {@link InputBoxOptions.value `value`}. Defined as tuple of two number where the + * Selection of the prefilled {@linkcode InputBoxOptions.value value}. Defined as tuple of two number where the * first is the inclusive start index and the second the exclusive end index. When `undefined` the whole * word will be selected, when empty (start equals end) only the cursor will be set, * otherwise the defined range will be selected. @@ -2034,12 +2034,12 @@ declare module 'vscode' { export type DocumentSelector = DocumentFilter | string | ReadonlyArray; /** - * A provider result represents the values a provider, like the {@link HoverProvider `HoverProvider`}, + * A provider result represents the values a provider, like the {@linkcode HoverProvider}, * may return. For once this is the actual result type `T`, like `Hover`, or a thenable that resolves * to that type `T`. In addition, `null` and `undefined` can be returned - either directly or from a * thenable. * - * The snippets below are all valid implementations of the {@link HoverProvider `HoverProvider`}: + * The snippets below are all valid implementations of the {@linkcode HoverProvider}: * * ```ts * let a: HoverProvider = { @@ -2234,7 +2234,7 @@ declare module 'vscode' { * A code action represents a change that can be performed in code, e.g. to fix a problem or * to refactor code. * - * A CodeAction must set either {@link CodeAction.edit `edit`} and/or a {@link CodeAction.command `command`}. If both are supplied, the `edit` is applied first, then the command is executed. + * A CodeAction must set either {@linkcode CodeAction.edit edit} and/or a {@linkcode CodeAction.command command}. If both are supplied, the `edit` is applied first, then the command is executed. */ export class CodeAction { @@ -2336,7 +2336,7 @@ declare module 'vscode' { provideCodeActions(document: TextDocument, range: Range | Selection, context: CodeActionContext, token: CancellationToken): ProviderResult<(Command | T)[]>; /** - * Given a code action fill in its {@link CodeAction.edit `edit`}-property. Changes to + * Given a code action fill in its {@linkcode CodeAction.edit edit}-property. Changes to * all other properties, like title, are ignored. A code action that has an edit * will not be resolved. * @@ -2393,9 +2393,9 @@ declare module 'vscode' { /** * Command that displays the documentation to the user. * - * This can display the documentation directly in the editor or open a website using {@link env.openExternal `env.openExternal`}; + * This can display the documentation directly in the editor or open a website using {@linkcode env.openExternal}; * - * The title of this documentation code action is taken from {@link Command.title `Command.title`} + * The title of this documentation code action is taken from {@linkcode Command.title} */ readonly command: Command; }>; @@ -2570,7 +2570,7 @@ declare module 'vscode' { * markdown syntax. Standard markdown is supported, also tables, but no embedded html. * * Rendering of {@link ThemeIcon theme icons} via the `$()`-syntax is supported - * when the {@link MarkdownString.supportThemeIcons `supportThemeIcons`} is set to `true`. + * when the {@linkcode MarkdownString.supportThemeIcons supportThemeIcons} is set to `true`. */ export class MarkdownString { @@ -2594,7 +2594,7 @@ declare module 'vscode' { * Creates a new markdown string with the given value. * * @param value Optional, initial value. - * @param supportThemeIcons Optional, Specifies whether {@link ThemeIcon ThemeIcons} are supported within the {@link MarkdownString `MarkdownString`}. + * @param supportThemeIcons Optional, Specifies whether {@link ThemeIcon ThemeIcons} are supported within the {@linkcode MarkdownString}. */ constructor(value?: string, supportThemeIcons?: boolean); @@ -2605,7 +2605,7 @@ declare module 'vscode' { appendText(value: string): MarkdownString; /** - * Appends the given string 'as is' to this markdown string. When {@link MarkdownString.supportThemeIcons `supportThemeIcons`} is `true`, {@link ThemeIcon ThemeIcons} in the `value` will be iconified. + * Appends the given string 'as is' to this markdown string. When {@linkcode MarkdownString.supportThemeIcons supportThemeIcons} is `true`, {@link ThemeIcon ThemeIcons} in the `value` will be iconified. * @param value Markdown string. */ appendMarkdown(value: string): MarkdownString; @@ -2623,7 +2623,7 @@ declare module 'vscode' { * or a code-block that provides a language and a code snippet. Note that * markdown strings will be sanitized - that means html will be escaped. * - * @deprecated This type is deprecated, please use {@link MarkdownString `MarkdownString`} instead. + * @deprecated This type is deprecated, please use {@linkcode MarkdownString} instead. */ export type MarkedString = string | { language: string; value: string }; @@ -3049,7 +3049,7 @@ declare module 'vscode' { /** * The range that should be selected and reveal when this symbol is being picked, e.g. the name of a function. - * Must be contained by the {@link DocumentSymbol.range `range`}. + * Must be contained by the {@linkcode DocumentSymbol.range range}. */ selectionRange: Range; @@ -3125,7 +3125,7 @@ declare module 'vscode' { /** * Given a symbol fill in its {@link SymbolInformation.location location}. This method is called whenever a symbol * is selected in the UI. Providers can implement this method and return incomplete symbols from - * {@link WorkspaceSymbolProvider.provideWorkspaceSymbols `provideWorkspaceSymbols`} which often helps to improve + * {@linkcode WorkspaceSymbolProvider.provideWorkspaceSymbols provideWorkspaceSymbols} which often helps to improve * performance. * * @param symbol The symbol that is to be resolved. Guaranteed to be an instance of an object returned from an @@ -3389,7 +3389,7 @@ declare module 'vscode' { /** * Builder-function that appends the given string to - * the {@link SnippetString.value `value`} of this snippet string. + * the {@linkcode SnippetString.value value} of this snippet string. * * @param string A value to append 'as given'. The string will be escaped. * @return This snippet string. @@ -3398,7 +3398,7 @@ declare module 'vscode' { /** * Builder-function that appends a tabstop (`$1`, `$2` etc) to - * the {@link SnippetString.value `value`} of this snippet string. + * the {@linkcode SnippetString.value value} of this snippet string. * * @param number The number of this tabstop, defaults to an auto-increment * value starting at 1. @@ -3408,7 +3408,7 @@ declare module 'vscode' { /** * Builder-function that appends a placeholder (`${1:value}`) to - * the {@link SnippetString.value `value`} of this snippet string. + * the {@linkcode SnippetString.value value} of this snippet string. * * @param value The value of this placeholder - either a string or a function * with which a nested snippet can be created. @@ -3420,7 +3420,7 @@ declare module 'vscode' { /** * Builder-function that appends a choice (`${1|a,b,c|}`) to - * the {@link SnippetString.value `value`} of this snippet string. + * the {@linkcode SnippetString.value value} of this snippet string. * * @param values The values for choices - the array of strings * @param number The number of this tabstop, defaults to an auto-increment @@ -3431,7 +3431,7 @@ declare module 'vscode' { /** * Builder-function that appends a variable (`${VAR}`) to - * the {@link SnippetString.value `value`} of this snippet string. + * the {@linkcode SnippetString.value value} of this snippet string. * * @param name The name of the variable - excluding the `$`. * @param defaultValue The default value which is used when the variable name cannot @@ -3846,7 +3846,7 @@ declare module 'vscode' { /** * The index of the active parameter. * - * If provided, this is used in place of {@link SignatureHelp.activeSignature `SignatureHelp.activeSignature`}. + * If provided, this is used in place of {@linkcode SignatureHelp.activeSignature}. */ activeParameter?: number; @@ -3883,7 +3883,7 @@ declare module 'vscode' { } /** - * How a {@link SignatureHelpProvider `SignatureHelpProvider`} was triggered. + * How a {@linkcode SignatureHelpProvider} was triggered. */ export enum SignatureHelpTriggerKind { /** @@ -3904,7 +3904,7 @@ declare module 'vscode' { /** * Additional information about the context in which a - * {@link SignatureHelpProvider.provideSignatureHelp `SignatureHelpProvider`} was triggered. + * {@linkcode SignatureHelpProvider.provideSignatureHelp SignatureHelpProvider} was triggered. */ export interface SignatureHelpContext { /** @@ -3929,7 +3929,7 @@ declare module 'vscode' { readonly isRetrigger: boolean; /** - * The currently active {@link SignatureHelp `SignatureHelp`}. + * The currently active {@linkcode SignatureHelp}. * * The `activeSignatureHelp` has its [`SignatureHelp.activeSignature`] field updated based on * the user arrowing through available signatures. @@ -3958,7 +3958,7 @@ declare module 'vscode' { } /** - * Metadata about a registered {@link SignatureHelpProvider `SignatureHelpProvider`}. + * Metadata about a registered {@linkcode SignatureHelpProvider}. */ export interface SignatureHelpProviderMetadata { /** @@ -4099,7 +4099,7 @@ declare module 'vscode' { * items. When having a leading word (prefix) ordering is based on how * well completions match that prefix and the initial ordering is only used * when completions match equally well. The prefix is defined by the - * {@link CompletionItem.range `range`}-property and can therefore be different + * {@linkcode CompletionItem.range range}-property and can therefore be different * for each completion. */ sortText?: string; @@ -4110,7 +4110,7 @@ declare module 'vscode' { * is used. * * Note that the filter text is matched against the leading word (prefix) which is defined - * by the {@link CompletionItem.range `range`}-property. + * by the {@linkcode CompletionItem.range range}-property. */ filterText?: string; @@ -4261,9 +4261,9 @@ declare module 'vscode' { * The completion item provider interface defines the contract between extensions and * [IntelliSense](https://code.visualstudio.com/docs/editor/intellisense). * - * Providers can delay the computation of the {@link CompletionItem.detail `detail`} - * and {@link CompletionItem.documentation `documentation`} properties by implementing the - * {@link CompletionItemProvider.resolveCompletionItem `resolveCompletionItem`}-function. However, properties that + * Providers can delay the computation of the {@linkcode CompletionItem.detail detail} + * and {@linkcode CompletionItem.documentation documentation} properties by implementing the + * {@linkcode CompletionItemProvider.resolveCompletionItem resolveCompletionItem}-function. However, properties that * are needed for the initial sorting and filtering, like `sortText`, `filterText`, `insertText`, and `range`, must * not be changed during resolve. * @@ -4361,7 +4361,7 @@ declare module 'vscode' { /** * Given a link fill in its {@link DocumentLink.target target}. This method is called when an incomplete * link is selected in the UI. Providers can implement this method and return incomplete links - * (without target) from the {@link DocumentLinkProvider.provideDocumentLinks `provideDocumentLinks`} method which + * (without target) from the {@linkcode DocumentLinkProvider.provideDocumentLinks provideDocumentLinks} method which * often helps to improve performance. * * @param link The link that is to be resolved. @@ -4432,7 +4432,7 @@ declare module 'vscode' { } /** - * A color presentation object describes how a {@link Color `color`} should be represented as text and what + * A color presentation object describes how a {@linkcode Color} should be represented as text and what * edits are required to refer to it from source code. * * For some languages one color can have multiple presentations, e.g. css can represent the color red with @@ -4661,7 +4661,7 @@ declare module 'vscode' { /** * The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function. - * Must be contained by the {@link CallHierarchyItem.range `range`}. + * Must be contained by the {@linkcode CallHierarchyItem.range range}. */ selectionRange: Range; @@ -4683,7 +4683,7 @@ declare module 'vscode' { /** * The range at which at which the calls appears. This is relative to the caller - * denoted by {@link CallHierarchyIncomingCall.from `this.from`}. + * denoted by {@linkcode CallHierarchyIncomingCall.from this.from}. */ fromRanges: Range[]; @@ -4708,8 +4708,8 @@ declare module 'vscode' { /** * The range at which this item is called. This is the range relative to the caller, e.g the item - * passed to {@link CallHierarchyProvider.provideCallHierarchyOutgoingCalls `provideCallHierarchyOutgoingCalls`} - * and not {@link CallHierarchyOutgoingCall.to `this.to`}. + * passed to {@linkcode CallHierarchyProvider.provideCallHierarchyOutgoingCalls provideCallHierarchyOutgoingCalls} + * and not {@linkcode CallHierarchyOutgoingCall.to this.to}. */ fromRanges: Range[]; @@ -5019,7 +5019,7 @@ declare module 'vscode' { * - *Workspace Folder settings* - From one of the {@link workspace.workspaceFolders Workspace Folders} under which requested resource belongs to. * - *Language settings* - Settings defined under requested language. * - * The *effective* value (returned by {@link WorkspaceConfiguration.get `get`}) is computed by overriding or merging the values in the following order. + * The *effective* value (returned by {@linkcode WorkspaceConfiguration.get get}) is computed by overriding or merging the values in the following order. * * ``` * `defaultValue` (if defined in `package.json` otherwise derived from the value's type) @@ -5621,7 +5621,7 @@ declare module 'vscode' { /** * The identifier of this item. * - * *Note*: if no identifier was provided by the {@link window.createStatusBarItem `window.createStatusBarItem`} + * *Note*: if no identifier was provided by the {@linkcode window.createStatusBarItem} * method, the identifier will match the {@link Extension.id extension identifier}. */ readonly id: string; @@ -5679,11 +5679,11 @@ declare module 'vscode' { backgroundColor: ThemeColor | undefined; /** - * {@link Command `Command`} or identifier of a command to run on click. + * {@linkcode Command} or identifier of a command to run on click. * * The command must be {@link commands.getCommands known}. * - * Note that if this is a {@link Command `Command`} object, only the {@link Command.command `command`} and {@link Command.arguments `arguments`} + * Note that if this is a {@linkcode Command} object, only the {@linkcode Command.command command} and {@linkcode Command.arguments arguments} * are used by the editor. */ command: string | Command | undefined; @@ -6011,7 +6011,7 @@ declare module 'vscode' { * or if an extension runs where the remote extension host runs. The extension kind * is defined in the `package.json`-file of extensions but can also be refined * via the `remote.extensionKind`-setting. When no remote extension host exists, - * the value is {@link ExtensionKind.UI `ExtensionKind.UI`}. + * the value is {@linkcode ExtensionKind.UI}. */ extensionKind: ExtensionKind; @@ -6121,8 +6121,8 @@ declare module 'vscode' { /** * Get the absolute path of a resource contained in the extension. * - * *Note* that an absolute uri can be constructed via {@link Uri.joinPath `Uri.joinPath`} and - * {@link ExtensionContext.extensionUri `extensionUri`}, e.g. `vscode.Uri.joinPath(context.extensionUri, relativePath);` + * *Note* that an absolute uri can be constructed via {@linkcode Uri.joinPath} and + * {@linkcode ExtensionContext.extensionUri extensionUri}, e.g. `vscode.Uri.joinPath(context.extensionUri, relativePath);` * * @param relativePath A relative path to a resource contained in the extension. * @return The absolute path of the resource. @@ -6135,10 +6135,10 @@ declare module 'vscode' { * up to the extension. However, the parent directory is guaranteed to be existent. * The value is `undefined` when no workspace nor folder has been opened. * - * Use {@link ExtensionContext.workspaceState `workspaceState`} or - * {@link ExtensionContext.globalState `globalState`} to store key value data. + * Use {@linkcode ExtensionContext.workspaceState workspaceState} or + * {@linkcode ExtensionContext.globalState globalState} to store key value data. * - * @see {@link FileSystem `workspace.fs`} for how to read and write files and folders from + * @see {@linkcode FileSystem workspace.fs} for how to read and write files and folders from * an uri. */ readonly storageUri: Uri | undefined; @@ -6148,8 +6148,8 @@ declare module 'vscode' { * can store private state. The directory might not exist on disk and creation is * up to the extension. However, the parent directory is guaranteed to be existent. * - * Use {@link ExtensionContext.workspaceState `workspaceState`} or - * {@link ExtensionContext.globalState `globalState`} to store key value data. + * Use {@linkcode ExtensionContext.workspaceState workspaceState} or + * {@linkcode ExtensionContext.globalState globalState} to store key value data. * * @deprecated Use {@link ExtensionContext.storageUri storageUri} instead. */ @@ -6160,9 +6160,9 @@ declare module 'vscode' { * The directory might not exist on disk and creation is * up to the extension. However, the parent directory is guaranteed to be existent. * - * Use {@link ExtensionContext.globalState `globalState`} to store key value data. + * Use {@linkcode ExtensionContext.globalState globalState} to store key value data. * - * @see {@link FileSystem `workspace.fs`} for how to read and write files and folders from + * @see {@linkcode FileSystem workspace.fs} for how to read and write files and folders from * an uri. */ readonly globalStorageUri: Uri; @@ -6172,7 +6172,7 @@ declare module 'vscode' { * The directory might not exist on disk and creation is * up to the extension. However, the parent directory is guaranteed to be existent. * - * Use {@link ExtensionContext.globalState `globalState`} to store key value data. + * Use {@linkcode ExtensionContext.globalState globalState} to store key value data. * * @deprecated Use {@link ExtensionContext.globalStorageUri globalStorageUri} instead. */ @@ -6183,7 +6183,7 @@ declare module 'vscode' { * The directory might not exist on disk and creation is up to the extension. However, * the parent directory is guaranteed to be existent. * - * @see {@link FileSystem `workspace.fs`} for how to read and write files and folders from + * @see {@linkcode FileSystem workspace.fs} for how to read and write files and folders from * an uri. */ readonly logUri: Uri; @@ -6817,7 +6817,7 @@ declare module 'vscode' { provideTasks(token: CancellationToken): ProviderResult; /** - * Resolves a task that has no {@link Task.execution `execution`} set. Tasks are + * Resolves a task that has no {@linkcode Task.execution execution} set. Tasks are * often created from information found in the `tasks.json`-file. Such tasks miss * the information on how to execute them and a task provider must fill in * the missing information in the `resolveTask`-method. This method will not be @@ -7103,7 +7103,7 @@ declare module 'vscode' { /** * A code that identifies this error. * - * Possible values are names of errors, like {@link FileSystemError.FileNotFound `FileNotFound`}, + * Possible values are names of errors, like {@linkcode FileSystemError.FileNotFound FileNotFound}, * or `Unknown` for unspecified errors. */ readonly code: string; @@ -7194,7 +7194,7 @@ declare module 'vscode' { * * @param uri The uri of the file to retrieve metadata about. * @return The file metadata about the file. - * @throws {@link FileSystemError.FileNotFound `FileNotFound`} when `uri` doesn't exist. + * @throws {@linkcode FileSystemError.FileNotFound FileNotFound} when `uri` doesn't exist. */ stat(uri: Uri): FileStat | Thenable; @@ -7203,7 +7203,7 @@ declare module 'vscode' { * * @param uri The uri of the folder. * @return An array of name/type-tuples or a thenable that resolves to such. - * @throws {@link FileSystemError.FileNotFound `FileNotFound`} when `uri` doesn't exist. + * @throws {@linkcode FileSystemError.FileNotFound FileNotFound} when `uri` doesn't exist. */ readDirectory(uri: Uri): [string, FileType][] | Thenable<[string, FileType][]>; @@ -7211,9 +7211,9 @@ declare module 'vscode' { * Create a new directory (Note, that new files are created via `write`-calls). * * @param uri The uri of the new folder. - * @throws {@link FileSystemError.FileNotFound `FileNotFound`} when the parent of `uri` doesn't exist, e.g. no mkdirp-logic required. - * @throws {@link FileSystemError.FileExists `FileExists`} when `uri` already exists. - * @throws {@link FileSystemError.NoPermissions `NoPermissions`} when permissions aren't sufficient. + * @throws {@linkcode FileSystemError.FileNotFound FileNotFound} when the parent of `uri` doesn't exist, e.g. no mkdirp-logic required. + * @throws {@linkcode FileSystemError.FileExists FileExists} when `uri` already exists. + * @throws {@linkcode FileSystemError.NoPermissions NoPermissions} when permissions aren't sufficient. */ createDirectory(uri: Uri): void | Thenable; @@ -7222,7 +7222,7 @@ declare module 'vscode' { * * @param uri The uri of the file. * @return An array of bytes or a thenable that resolves to such. - * @throws {@link FileSystemError.FileNotFound `FileNotFound`} when `uri` doesn't exist. + * @throws {@linkcode FileSystemError.FileNotFound FileNotFound} when `uri` doesn't exist. */ readFile(uri: Uri): Uint8Array | Thenable; @@ -7232,10 +7232,10 @@ declare module 'vscode' { * @param uri The uri of the file. * @param content The new content of the file. * @param options Defines if missing files should or must be created. - * @throws {@link FileSystemError.FileNotFound `FileNotFound`} when `uri` doesn't exist and `create` is not set. - * @throws {@link FileSystemError.FileNotFound `FileNotFound`} when the parent of `uri` doesn't exist and `create` is set, e.g. no mkdirp-logic required. - * @throws {@link FileSystemError.FileExists `FileExists`} when `uri` already exists, `create` is set but `overwrite` is not set. - * @throws {@link FileSystemError.NoPermissions `NoPermissions`} when permissions aren't sufficient. + * @throws {@linkcode FileSystemError.FileNotFound FileNotFound} when `uri` doesn't exist and `create` is not set. + * @throws {@linkcode FileSystemError.FileNotFound FileNotFound} when the parent of `uri` doesn't exist and `create` is set, e.g. no mkdirp-logic required. + * @throws {@linkcode FileSystemError.FileExists FileExists} when `uri` already exists, `create` is set but `overwrite` is not set. + * @throws {@linkcode FileSystemError.NoPermissions NoPermissions} when permissions aren't sufficient. */ writeFile(uri: Uri, content: Uint8Array, options: { create: boolean, overwrite: boolean }): void | Thenable; @@ -7244,8 +7244,8 @@ declare module 'vscode' { * * @param uri The resource that is to be deleted. * @param options Defines if deletion of folders is recursive. - * @throws {@link FileSystemError.FileNotFound `FileNotFound`} when `uri` doesn't exist. - * @throws {@link FileSystemError.NoPermissions `NoPermissions`} when permissions aren't sufficient. + * @throws {@linkcode FileSystemError.FileNotFound FileNotFound} when `uri` doesn't exist. + * @throws {@linkcode FileSystemError.NoPermissions NoPermissions} when permissions aren't sufficient. */ delete(uri: Uri, options: { recursive: boolean }): void | Thenable; @@ -7255,10 +7255,10 @@ declare module 'vscode' { * @param oldUri The existing file. * @param newUri The new location. * @param options Defines if existing files should be overwritten. - * @throws {@link FileSystemError.FileNotFound `FileNotFound`} when `oldUri` doesn't exist. - * @throws {@link FileSystemError.FileNotFound `FileNotFound`} when parent of `newUri` doesn't exist, e.g. no mkdirp-logic required. - * @throws {@link FileSystemError.FileExists `FileExists`} when `newUri` exists and when the `overwrite` option is not `true`. - * @throws {@link FileSystemError.NoPermissions `NoPermissions`} when permissions aren't sufficient. + * @throws {@linkcode FileSystemError.FileNotFound FileNotFound} when `oldUri` doesn't exist. + * @throws {@linkcode FileSystemError.FileNotFound FileNotFound} when parent of `newUri` doesn't exist, e.g. no mkdirp-logic required. + * @throws {@linkcode FileSystemError.FileExists FileExists} when `newUri` exists and when the `overwrite` option is not `true`. + * @throws {@linkcode FileSystemError.NoPermissions NoPermissions} when permissions aren't sufficient. */ rename(oldUri: Uri, newUri: Uri, options: { overwrite: boolean }): void | Thenable; @@ -7269,10 +7269,10 @@ declare module 'vscode' { * @param source The existing file. * @param destination The destination location. * @param options Defines if existing files should be overwritten. - * @throws {@link FileSystemError.FileNotFound `FileNotFound`} when `source` doesn't exist. - * @throws {@link FileSystemError.FileNotFound `FileNotFound`} when parent of `destination` doesn't exist, e.g. no mkdirp-logic required. - * @throws {@link FileSystemError.FileExists `FileExists`} when `destination` exists and when the `overwrite` option is not `true`. - * @throws {@link FileSystemError.NoPermissions `NoPermissions`} when permissions aren't sufficient. + * @throws {@linkcode FileSystemError.FileNotFound FileNotFound} when `source` doesn't exist. + * @throws {@linkcode FileSystemError.FileNotFound FileNotFound} when parent of `destination` doesn't exist, e.g. no mkdirp-logic required. + * @throws {@linkcode FileSystemError.FileExists FileExists} when `destination` exists and when the `overwrite` option is not `true`. + * @throws {@linkcode FileSystemError.NoPermissions NoPermissions} when permissions aren't sufficient. */ copy?(source: Uri, destination: Uri, options: { overwrite: boolean }): void | Thenable; } @@ -7283,7 +7283,7 @@ declare module 'vscode' { * with files from the local disk as well as files from remote places, like the * remote extension host or ftp-servers. * - * *Note* that an instance of this interface is available as {@link workspace.fs `workspace.fs`}. + * *Note* that an instance of this interface is available as {@linkcode workspace.fs}. */ export interface FileSystem { @@ -7444,7 +7444,7 @@ declare module 'vscode' { * This should be a complete, valid html document. Changing this property causes the webview to be reloaded. * * Webviews are sandboxed from normal extension process, so all communication with the webview must use - * message passing. To send a message from the extension to the webview, use {@link Webview.postMessage `postMessage`}. + * message passing. To send a message from the extension to the webview, use {@linkcode Webview.postMessage postMessage}. * To send message from the webview back to an extension, use the `acquireVsCodeApi` function inside the webview * to get a handle to the editor's api and then call `.postMessage()`: * @@ -7455,8 +7455,8 @@ declare module 'vscode' { * * ``` * - * To load a resources from the workspace inside a webview, use the {@link Webview.asWebviewUri `asWebviewUri`} method - * and ensure the resource's directory is listed in {@link WebviewOptions.localResourceRoots `WebviewOptions.localResourceRoots`}. + * To load a resources from the workspace inside a webview, use the {@linkcode Webview.asWebviewUri asWebviewUri} method + * and ensure the resource's directory is listed in {@linkcode WebviewOptions.localResourceRoots}. * * Keep in mind that even though webviews are sandboxed, they still allow running scripts and loading arbitrary content, * so extensions must follow all standard web security best practices when working with webviews. This includes @@ -7569,7 +7569,7 @@ declare module 'vscode' { iconPath?: Uri | { light: Uri; dark: Uri }; /** - * {@link Webview `Webview`} belonging to the panel. + * {@linkcode Webview} belonging to the panel. */ readonly webview: Webview; @@ -7814,7 +7814,7 @@ declare module 'vscode' { /** * Provider for text based custom editors. * - * Text based custom editors use a {@link TextDocument `TextDocument`} as their data model. This considerably simplifies + * Text based custom editors use a {@linkcode TextDocument} as their data model. This considerably simplifies * implementing a custom editor as it allows the editor to handle many common operations such as * undo and backup. The provider is responsible for synchronizing text changes between the webview and the `TextDocument`. */ @@ -7833,7 +7833,7 @@ declare module 'vscode' { * * During resolve, the provider must fill in the initial html for the content webview panel and hook up all * the event listeners on it that it is interested in. The provider can also hold onto the `WebviewPanel` to - * use later for example in a command. See {@link WebviewPanel `WebviewPanel`} for additional details. + * use later for example in a command. See {@linkcode WebviewPanel} for additional details. * * @param token A cancellation token that indicates the result is no longer needed. * @@ -7843,7 +7843,7 @@ declare module 'vscode' { } /** - * Represents a custom document used by a {@link CustomEditorProvider `CustomEditorProvider`}. + * Represents a custom document used by a {@linkcode CustomEditorProvider}. * * Custom documents are only used within a given `CustomEditorProvider`. The lifecycle of a `CustomDocument` is * managed by the editor. When no more references remain to a `CustomDocument`, it is disposed of. @@ -7864,9 +7864,9 @@ declare module 'vscode' { } /** - * Event triggered by extensions to signal to the editor that an edit has occurred on an {@link CustomDocument `CustomDocument`}. + * Event triggered by extensions to signal to the editor that an edit has occurred on an {@linkcode CustomDocument}. * - * @see {@link CustomEditorProvider.onDidChangeCustomDocument `CustomEditorProvider.onDidChangeCustomDocument`}. + * @see {@linkcode CustomEditorProvider.onDidChangeCustomDocument}. */ interface CustomDocumentEditEvent { @@ -7902,10 +7902,10 @@ declare module 'vscode' { } /** - * Event triggered by extensions to signal to the editor that the content of a {@link CustomDocument `CustomDocument`} + * Event triggered by extensions to signal to the editor that the content of a {@linkcode CustomDocument} * has changed. * - * @see {@link CustomEditorProvider.onDidChangeCustomDocument `CustomEditorProvider.onDidChangeCustomDocument`}. + * @see {@linkcode CustomEditorProvider.onDidChangeCustomDocument}. */ interface CustomDocumentContentChangeEvent { /** @@ -7915,7 +7915,7 @@ declare module 'vscode' { } /** - * A backup for an {@link CustomDocument `CustomDocument`}. + * A backup for an {@linkcode CustomDocument}. */ interface CustomDocumentBackup { /** @@ -7935,7 +7935,7 @@ declare module 'vscode' { } /** - * Additional information used to implement {@link CustomEditableDocument.backup `CustomEditableDocument.backup`}. + * Additional information used to implement {@linkcode CustomEditableDocument.backup}. */ interface CustomDocumentBackupContext { /** @@ -7973,10 +7973,10 @@ declare module 'vscode' { /** * Provider for readonly custom editors that use a custom document model. * - * Custom editors use {@link CustomDocument `CustomDocument`} as their document model instead of a {@link TextDocument `TextDocument`}. + * Custom editors use {@linkcode CustomDocument} as their document model instead of a {@linkcode TextDocument}. * * You should use this type of custom editor when dealing with binary files or more complex scenarios. For simple - * text based documents, use {@link CustomTextEditorProvider `CustomTextEditorProvider`} instead. + * text based documents, use {@linkcode CustomTextEditorProvider} instead. * * @param T Type of the custom document returned by this provider. */ @@ -8011,7 +8011,7 @@ declare module 'vscode' { * * During resolve, the provider must fill in the initial html for the content webview panel and hook up all * the event listeners on it that it is interested in. The provider can also hold onto the `WebviewPanel` to - * use later for example in a command. See {@link WebviewPanel `WebviewPanel`} for additional details. + * use later for example in a command. See {@linkcode WebviewPanel} for additional details. * * @param token A cancellation token that indicates the result is no longer needed. * @@ -8023,11 +8023,11 @@ declare module 'vscode' { /** * Provider for editable custom editors that use a custom document model. * - * Custom editors use {@link CustomDocument `CustomDocument`} as their document model instead of a {@link TextDocument `TextDocument`}. + * Custom editors use {@linkcode CustomDocument} as their document model instead of a {@linkcode TextDocument}. * This gives extensions full control over actions such as edit, save, and backup. * * You should use this type of custom editor when dealing with binary files or more complex scenarios. For simple - * text based documents, use {@link CustomTextEditorProvider `CustomTextEditorProvider`} instead. + * text based documents, use {@linkcode CustomTextEditorProvider} instead. * * @param T Type of the custom document returned by this provider. */ @@ -8256,7 +8256,7 @@ declare module 'vscode' { * * a mail client (`mailto:`) * * VSCode itself (`vscode:` from `vscode.env.uriScheme`) * - * *Note* that {@link window.showTextDocument `showTextDocument`} is the right + * *Note* that {@linkcode window.showTextDocument showTextDocument} is the right * way to open a text document inside the editor, not this function. * * @param target The uri that should be opened. @@ -8394,7 +8394,7 @@ declare module 'vscode' { * * * *Note 1:* When executing an editor command not all types are allowed to * be passed as arguments. Allowed are the primitive types `string`, `boolean`, - * `number`, `undefined`, and `null`, as well as {@link Position `Position`}, {@link Range `Range`}, {@link Uri `Uri`} and {@link Location `Location`}. + * `number`, `undefined`, and `null`, as well as {@linkcode Position}, {@linkcode Range}, {@linkcode Uri} and {@linkcode Location}. * * *Note 2:* There are no restrictions when executing commands that have been contributed * by extensions. * @@ -8539,7 +8539,7 @@ declare module 'vscode' { * * @param document A text document to be shown. * @param column A view column in which the {@link TextEditor editor} should be shown. The default is the {@link ViewColumn.Active active}, other values - * are adjusted to be `Min(column, columnCount + 1)`, the {@link ViewColumn.Active active}-column is not adjusted. Use {@link ViewColumn.Beside `ViewColumn.Beside`} + * are adjusted to be `Min(column, columnCount + 1)`, the {@link ViewColumn.Active active}-column is not adjusted. Use {@linkcode ViewColumn.Beside} * to open the editor to the side of the currently active one. * @param preserveFocus When `true` the editor will not take focus. * @return A promise that resolves to an {@link TextEditor editor}. @@ -8880,7 +8880,7 @@ declare module 'vscode' { /** * Show progress in the editor. Progress is shown while running the given callback * and while the promise it returned isn't resolved nor rejected. The location at which - * progress should show (and other details) is defined via the passed {@link ProgressOptions `ProgressOptions`}. + * progress should show (and other details) is defined via the passed {@linkcode ProgressOptions}. * * @param task A callback returning a promise. Progress state can be reported with * the provided {@link Progress}-object. @@ -8890,7 +8890,7 @@ declare module 'vscode' { * e.g. `10` accounts for `10%` of work done). * Note that currently only `ProgressLocation.Notification` is capable of showing discrete progress. * - * To monitor if the operation has been cancelled by the user, use the provided {@link CancellationToken `CancellationToken`}. + * To monitor if the operation has been cancelled by the user, use the provided {@linkcode CancellationToken}. * Note that currently only `ProgressLocation.Notification` is supporting to show a cancel button to cancel the * long running operation. * @@ -9042,8 +9042,8 @@ declare module 'vscode' { * Register a provider for custom editors for the `viewType` contributed by the `customEditors` extension point. * * When a custom editor is opened, an `onCustomEditor:viewType` activation event is fired. Your extension - * must register a {@link CustomTextEditorProvider `CustomTextEditorProvider`}, {@link CustomReadonlyEditorProvider `CustomReadonlyEditorProvider`}, - * {@link CustomEditorProvider `CustomEditorProvider`}for `viewType` as part of activation. + * must register a {@linkcode CustomTextEditorProvider}, {@linkcode CustomReadonlyEditorProvider}, + * {@linkcode CustomEditorProvider}for `viewType` as part of activation. * * @param viewType Unique identifier for the custom editor provider. This should match the `viewType` from the * `customEditors` contribution point. @@ -10188,7 +10188,7 @@ declare module 'vscode' { * An event that is fired when a {@link TextDocument document} will be saved. * * To make modifications to the document before it is being saved, call the - * {@link TextDocumentWillSaveEvent.waitUntil `waitUntil`}-function with a thenable + * {@linkcode TextDocumentWillSaveEvent.waitUntil waitUntil}-function with a thenable * that resolves to an array of {@link TextEdit text edits}. */ export interface TextDocumentWillSaveEvent { @@ -10239,7 +10239,7 @@ declare module 'vscode' { * An event that is fired when files are going to be created. * * To make modifications to the workspace before the files are created, - * call the {@link FileWillCreateEvent.waitUntil `waitUntil`}-function with a + * call the {@linkcode FileWillCreateEvent.waitUntil waitUntil}-function with a * thenable that resolves to a {@link WorkspaceEdit workspace edit}. */ export interface FileWillCreateEvent { @@ -10474,7 +10474,7 @@ declare module 'vscode' { * Refer to https://code.visualstudio.com/docs/editor/workspaces for more information * on workspaces. * - * @deprecated Use {@link workspace.workspaceFolders `workspaceFolders`} instead. + * @deprecated Use {@linkcode workspace.workspaceFolders workspaceFolders} instead. */ export const rootPath: string | undefined; @@ -10570,7 +10570,7 @@ declare module 'vscode' { * one that called this method) will be terminated and restarted so that the (deprecated) `rootPath` property is * updated to point to the first workspace folder. * - * Use the {@link onDidChangeWorkspaceFolders `onDidChangeWorkspaceFolders()`} event to get notified when the + * Use the {@linkcode onDidChangeWorkspaceFolders onDidChangeWorkspaceFolders()} event to get notified when the * workspace folders have been updated. * * **Example:** adding a new workspace folder at the end of workspace folders @@ -10592,7 +10592,7 @@ declare module 'vscode' { * to rename that folder. * * **Note:** it is not valid to call {@link updateWorkspaceFolders updateWorkspaceFolders()} multiple times - * without waiting for the {@link onDidChangeWorkspaceFolders `onDidChangeWorkspaceFolders()`} to fire. + * without waiting for the {@linkcode onDidChangeWorkspaceFolders onDidChangeWorkspaceFolders()} to fire. * * @param start the zero-based location in the list of currently opened {@link WorkspaceFolder workspace folders} * from which to start deleting workspace folders. @@ -10686,7 +10686,7 @@ declare module 'vscode' { * {@link FileSystemProvider file system providers} are consulted. * * *Note* that the lifecycle of the returned document is owned by the editor and not by the extension. That means an - * {@link workspace.onDidCloseTextDocument `onDidClose`}-event can occur at any time after opening it. + * {@linkcode workspace.onDidCloseTextDocument onDidClose}-event can occur at any time after opening it. * * @param uri Identifies the resource to open. * @return A promise that resolves to a {@link TextDocument document}. @@ -10742,7 +10742,7 @@ declare module 'vscode' { * of a text document {@link languages.setTextDocumentLanguage has been changed}. * * *Note 1:* There is no guarantee that this event fires when an editor tab is closed, use the - * {@link window.onDidChangeVisibleTextEditors `onDidChangeVisibleTextEditors`}-event to know when editors change. + * {@linkcode window.onDidChangeVisibleTextEditors onDidChangeVisibleTextEditors}-event to know when editors change. * * *Note 2:* A document can be open but not shown in an editor which means this event can fire * for a document that has not been shown in an editor. @@ -10783,10 +10783,10 @@ declare module 'vscode' { /** * Open a notebook. Will return early if this notebook is already {@link notebook.notebookDocuments loaded}. Otherwise - * the notebook is loaded and the {@link notebook.onDidOpenNotebookDocument `onDidOpenNotebookDocument`}-event fires. + * the notebook is loaded and the {@linkcode notebook.onDidOpenNotebookDocument onDidOpenNotebookDocument}-event fires. * * *Note* that the lifecycle of the returned notebook is owned by the editor and not by the extension. That means an - * {@link notebook.onDidCloseNotebookDocument `onDidCloseNotebookDocument`}-event can occur at any time after. + * {@linkcode notebook.onDidCloseNotebookDocument onDidCloseNotebookDocument}-event can occur at any time after. * * *Note* that opening a notebook does not show a notebook editor. This function only returns a notebook document which * can be showns in a notebook editor but it can also be used for other things. @@ -10839,9 +10839,9 @@ declare module 'vscode' { * An event that is emitted when files are being created. * * *Note 1:* This event is triggered by user gestures, like creating a file from the - * explorer, or from the {@link workspace.applyEdit `workspace.applyEdit`}-api. This event is *not* fired when + * explorer, or from the {@linkcode workspace.applyEdit}-api. This event is *not* fired when * files change on disk, e.g triggered by another application, or when using the - * {@link FileSystem `workspace.fs`}-api. + * {@linkcode FileSystem workspace.fs}-api. * * *Note 2:* When this event is fired, edits to files that are are being created cannot be applied. */ @@ -10851,9 +10851,9 @@ declare module 'vscode' { * An event that is emitted when files have been created. * * *Note:* This event is triggered by user gestures, like creating a file from the - * explorer, or from the {@link workspace.applyEdit `workspace.applyEdit`}-api, but this event is *not* fired when + * explorer, or from the {@linkcode workspace.applyEdit}-api, but this event is *not* fired when * files change on disk, e.g triggered by another application, or when using the - * {@link FileSystem `workspace.fs`}-api. + * {@linkcode FileSystem workspace.fs}-api. */ export const onDidCreateFiles: Event; @@ -10861,9 +10861,9 @@ declare module 'vscode' { * An event that is emitted when files are being deleted. * * *Note 1:* This event is triggered by user gestures, like deleting a file from the - * explorer, or from the {@link workspace.applyEdit `workspace.applyEdit`}-api, but this event is *not* fired when + * explorer, or from the {@linkcode workspace.applyEdit}-api, but this event is *not* fired when * files change on disk, e.g triggered by another application, or when using the - * {@link FileSystem `workspace.fs`}-api. + * {@linkcode FileSystem workspace.fs}-api. * * *Note 2:* When deleting a folder with children only one event is fired. */ @@ -10873,9 +10873,9 @@ declare module 'vscode' { * An event that is emitted when files have been deleted. * * *Note 1:* This event is triggered by user gestures, like deleting a file from the - * explorer, or from the {@link workspace.applyEdit `workspace.applyEdit`}-api, but this event is *not* fired when + * explorer, or from the {@linkcode workspace.applyEdit}-api, but this event is *not* fired when * files change on disk, e.g triggered by another application, or when using the - * {@link FileSystem `workspace.fs`}-api. + * {@linkcode FileSystem workspace.fs}-api. * * *Note 2:* When deleting a folder with children only one event is fired. */ @@ -10885,9 +10885,9 @@ declare module 'vscode' { * An event that is emitted when files are being renamed. * * *Note 1:* This event is triggered by user gestures, like renaming a file from the - * explorer, and from the {@link workspace.applyEdit `workspace.applyEdit`}-api, but this event is *not* fired when + * explorer, and from the {@linkcode workspace.applyEdit}-api, but this event is *not* fired when * files change on disk, e.g triggered by another application, or when using the - * {@link FileSystem `workspace.fs`}-api. + * {@linkcode FileSystem workspace.fs}-api. * * *Note 2:* When renaming a folder with children only one event is fired. */ @@ -10897,9 +10897,9 @@ declare module 'vscode' { * An event that is emitted when files have been renamed. * * *Note 1:* This event is triggered by user gestures, like renaming a file from the - * explorer, and from the {@link workspace.applyEdit `workspace.applyEdit`}-api, but this event is *not* fired when + * explorer, and from the {@linkcode workspace.applyEdit}-api, but this event is *not* fired when * files change on disk, e.g triggered by another application, or when using the - * {@link FileSystem `workspace.fs`}-api. + * {@linkcode FileSystem workspace.fs}-api. * * *Note 2:* When renaming a folder with children only one event is fired. */ @@ -11024,8 +11024,8 @@ declare module 'vscode' { * Set (and change) the {@link TextDocument.languageId language} that is associated * with the given document. * - * *Note* that calling this function will trigger the {@link workspace.onDidCloseTextDocument `onDidCloseTextDocument`} event - * followed by the {@link workspace.onDidOpenTextDocument `onDidOpenTextDocument`} event. + * *Note* that calling this function will trigger the {@linkcode workspace.onDidCloseTextDocument onDidCloseTextDocument} event + * followed by the {@linkcode workspace.onDidOpenTextDocument onDidOpenTextDocument} event. * * @param document The document which language is to be changed * @param languageId The new language identifier. @@ -11038,9 +11038,9 @@ declare module 'vscode' { * greater than zero mean the selector matches the document. * * A match is computed according to these rules: - * 1. When {@link DocumentSelector `DocumentSelector`} is an array, compute the match for each contained `DocumentFilter` or language identifier and take the maximum value. - * 2. A string will be desugared to become the `language`-part of a {@link DocumentFilter `DocumentFilter`}, so `"fooLang"` is like `{ language: "fooLang" }`. - * 3. A {@link DocumentFilter `DocumentFilter`} will be matched against the document by comparing its parts with the document. The following rules apply: + * 1. When {@linkcode DocumentSelector} is an array, compute the match for each contained `DocumentFilter` or language identifier and take the maximum value. + * 2. A string will be desugared to become the `language`-part of a {@linkcode DocumentFilter}, so `"fooLang"` is like `{ language: "fooLang" }`. + * 3. A {@linkcode DocumentFilter} will be matched against the document by comparing its parts with the document. The following rules apply: * 1. When the `DocumentFilter` is empty (`{}`) the result is `0` * 2. When `scheme`, `language`, or `pattern` are defined but one doesn’t match, the result is `0` * 3. Matching against `*` gives a score of `5`, matching via equality or via a glob-pattern gives a score of `10` @@ -11782,7 +11782,7 @@ declare module 'vscode' { static error(value: Error): NotebookCellOutputItem; /** - * The mime type which determines how the {@link NotebookCellOutputItem.data `data`}-property + * The mime type which determines how the {@linkcode NotebookCellOutputItem.data data}-property * is interpreted. * * Notebooks have built-in support for certain mime-types, extensions can add support for new @@ -11841,7 +11841,7 @@ declare module 'vscode' { } /** - * NotebookCellData is the raw representation of notebook cells. Its is part of {@link NotebookData `NotebookData`}. + * NotebookCellData is the raw representation of notebook cells. Its is part of {@linkcode NotebookData}. */ export class NotebookCellData { @@ -11857,7 +11857,7 @@ declare module 'vscode' { /** * The language identifier of the source value of this cell data. Any value from - * {@link languages.getLanguages `getLanguages`} is possible. + * {@linkcode languages.getLanguages getLanguages} is possible. */ languageId: string; @@ -11890,8 +11890,8 @@ declare module 'vscode' { /** * Raw representation of a notebook. * - * Extensions are responsible for creating {@link NotebookData `NotebookData`} so that the editor - * can create a {@link NotebookDocument `NotebookDocument`}. + * Extensions are responsible for creating {@linkcode NotebookData} so that the editor + * can create a {@linkcode NotebookDocument}. * * @see {@link NotebookSerializer} */ @@ -11989,12 +11989,12 @@ declare module 'vscode' { * A notebook controller represents an entity that can execute notebook cells. This is often referred to as a kernel. * * There can be multiple controllers and the editor will let users choose which controller to use for a certain notebook. The - * {@link NotebookController.notebookType `notebookType`}-property defines for what kind of notebooks a controller is for and - * the {@link NotebookController.updateNotebookAffinity `updateNotebookAffinity`}-function allows controllers to set a preference + * {@linkcode NotebookController.notebookType notebookType}-property defines for what kind of notebooks a controller is for and + * the {@linkcode NotebookController.updateNotebookAffinity updateNotebookAffinity}-function allows controllers to set a preference * for specific notebook documents. When a controller has been selected its * {@link NotebookController.onDidChangeSelectedNotebooks onDidChangeSelectedNotebooks}-event fires. * - * When a cell is being run the editor will invoke the {@link NotebookController.executeHandler `executeHandler`} and a controller + * When a cell is being run the editor will invoke the {@linkcode NotebookController.executeHandler executeHandler} and a controller * is expected to create and finalize a {@link NotebookCellExecution notebook cell execution}. However, controllers are also free * to create executions by themselves. */ @@ -12015,7 +12015,7 @@ declare module 'vscode' { /** * An array of language identifiers that are supported by this - * controller. Any language identifier from {@link languages.getLanguages `getLanguages`} + * controller. Any language identifier from {@linkcode languages.getLanguages getLanguages} * is possible. When falsy all languages are supported. * * Samples: @@ -12117,9 +12117,9 @@ declare module 'vscode' { * A NotebookCellExecution is how {@link NotebookController notebook controller} modify a notebook cell as * it is executing. * - * When a cell execution object is created, the cell enters the {@link NotebookCellExecutionState.Pending `Pending`} state. - * When {@link NotebookCellExecution.start `start(...)`} is called on the execution task, it enters the {@link NotebookCellExecutionState.Executing `Executing`} state. When - * {@link NotebookCellExecution.end `end(...)`} is called, it enters the {@link NotebookCellExecutionState.Idle `Idle`} state. + * When a cell execution object is created, the cell enters the {@linkcode NotebookCellExecutionState.Pending Pending} state. + * When {@linkcode NotebookCellExecution.start start(...)} is called on the execution task, it enters the {@linkcode NotebookCellExecutionState.Executing Executing} state. When + * {@linkcode NotebookCellExecution.end end(...)} is called, it enters the {@linkcode NotebookCellExecutionState.Idle Idle} state. */ export interface NotebookCellExecution { @@ -12239,11 +12239,11 @@ declare module 'vscode' { alignment: NotebookCellStatusBarAlignment; /** - * An optional {@link Command `Command`} or identifier of a command to run on click. + * An optional {@linkcode Command} or identifier of a command to run on click. * * The command must be {@link commands.getCommands known}. * - * Note that if this is a {@link Command `Command`} object, only the {@link Command.command `command`} and {@link Command.arguments `arguments`} + * Note that if this is a {@linkcode Command} object, only the {@linkcode Command.command command} and {@linkcode Command.arguments arguments} * are used by the editor. */ command?: string | Command; diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index b09b8ad46a4e0..7749daed659c3 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -423,7 +423,7 @@ declare module 'vscode' { export interface TextSearchComplete { /** * Whether the search hit the limit on the maximum number of search results. - * `maxResults` on {@link TextSearchOptions `TextSearchOptions`} specifies the max number of results. + * `maxResults` on {@linkcode TextSearchOptions} specifies the max number of results. * - If exactly that number of matches exist, this should be false. * - If `maxResults` matches are returned and more exist, this should be true. * - If search hits an internal limit which is less than `maxResults`, this should be true.