microsoft / vscode-extension-samples

Sample code illustrating the VS Code extension API.
MIT License
8.68k stars 3.4k forks source link

Make a component like bread-crumb menu #369

Closed phatNfqAsia closed 3 years ago

phatNfqAsia commented 3 years ago

Hello, I am making an extension to help move cursor in JSX easier but I can not see any API to make similar UI to the breadcrumbs (shown by press Cmd + Shift + .). Is this doable via the CallHierarchyProvider (to assign event handler to items of the call hierarchy)? Is there any other ways?

image

mjbvz commented 3 years ago

The breadcrumbs are defined by the document symbols. You can use the document symbol provider api to customize what the breadcrumbs show

However there is no API support for creating custom UI like the breadcrumbs

coolcorexix commented 2 years ago

@mjbvz I take your guidance and work with DocumentSymbolProvider, but currently it is having this error https://github.com/microsoft/vscode/issues/156738 Please help me have a look 🥺