Allow TreeItem.label to support MarkdownString
See original GitHub issueLooking at the API for TreeItemLabel it seems a bit limited. I’m trying to avoid moving to a webview view and what I need is some way to have certain nodes in a tree view be crossed out. It’d be nice if TreeItem.label
could be extended to support MarkdownString
.
Proposal:
export class TreeItem {
/**
* A human-readable string describing this item. When `falsy`, it is derived from [resourceUri](#TreeItem.resourceUri).
*/
label?: string | TreeItemLabel | MarkdownString;
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:26
- Comments:10 (5 by maintainers)
Top Results From Across the Web
VS Code API | Visual Studio Code Extension API
A debug configuration provider allows to add debug configurations to the debug service and to resolve launch configurations before they are used to...
Read more >ARIA: treeitem role - Accessibility - MDN Web Docs - Mozilla
A treeitem is an item in a tree. ... from the treeitem 's contents. The accessible name can also be set via aria-label...
Read more >vscode.TreeItem - Haxe externs for Visual Studio Code
If not provided, an id is generated using the tree item's label. Note that when labels change, ids will change and that selection...
Read more >react-vscode - npm
This package allows you to write TreeViews in React. ... <TreeItem label="first top-level" initiallyExpanded> <SomeThings /> </TreeItem> ) ...
Read more >vscode TreeDataProvider TypeScript Examples
extractTextFromType(currentFile.type); return { iconPath: iconUri, label: ... getTreeItem(element: MenuItem): TreeItem { let iconPath: vscode.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey, I am currently working on an extension which enables a user to open packet traces in vscode. While prototyping I came across this issue.
Having an option to use a monospaced font would improve readability a lot in my case.
Before:
After:
It would be nice if colours were supported too, but I believe this not something that could be achieved with a
MarkdownString
? Would it make sense to have a way to bypass escaping when setting the label value and allow nested span objects?