Files
vscode/src/vscode-dts/vscode.proposed.treeItemMarkdownLabel.d.ts
Kyle Cutler 70c31a4909 Support basic MarkdownStrings in tree view labels (#272435)
* Support rendering icons in tree view labels

* Use MarkdownStrings instead of a flag

* Add TreeItem2 to ext API

* Remove API in TreeItem, better highlight support

* Support bold, improve docstring

* PR feedback

* Fix default, PR feedback
2025-10-24 14:47:31 +02:00

24 lines
981 B
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'vscode' {
// @kycutler https://github.com/microsoft/vscode/issues/271523
export interface TreeItemLabel2 {
highlights?: [number, number][];
/**
* A human-readable string or MarkdownString describing the {@link TreeItem Tree item}.
*
* When using MarkdownString, only the following Markdown syntax is supported:
* - Icons (e.g., `$(icon-name)`, when the `supportIcons` flag is also set)
* - Bold, italics, and strikethrough formatting, but only when the syntax wraps the entire string
* (e.g., `**bold**`, `_italic_`, `~~strikethrough~~`)
*/
label: string | MarkdownString;
}
}