mdx-analyzer icon indicating copy to clipboard operation
mdx-analyzer copied to clipboard

outline pane

Open stefanprobst opened this issue 3 years ago • 2 comments

Subject of the feature

VSCode has a outline panel, which works for markdown files, but currently not for mdx files. It would be great if it would!

Problem

Currently, the ouline pane shows a "No symbols found in document" message.

Expected behavior

Document outline should be accessible in outline pane.

Alternatives

Manually switch the language from "Markdown React" to "Markdown" to get the outline.

stefanprobst avatar Apr 12 '21 20:04 stefanprobst

for markdown this is handled by this DocumentSymbolProvider, but no idea how to reuse this for mdx

stefanprobst avatar Apr 13 '21 12:04 stefanprobst

mdx requires runtime info, so I think it can not be fully supported, but for previewing simple mdx as markdown, it may be good to have. But I personally don't have much experience on VSCode extension, PR welcome.

JounQin avatar Jul 06 '22 08:07 JounQin

For me the code outline works in mdx. Not sure if something has changed?

Temez1 avatar Nov 20 '22 22:11 Temez1

@Temez1 Check the file type info in the status bar. If you see Markdown instead of Markdown React, then it must be something/where else to change the file type mapping.

nightire avatar Dec 12 '22 13:12 nightire

The initial IntelliSense added support for document symbols (used by for example the outline pane and breadcrumbs). Currently only JavaScript symbols are supported. I’ll use this issue to track support for markdown headings.

remcohaszing avatar Jan 13 '23 12:01 remcohaszing

Released in [email protected], @mdx-js/[email protected] :tada:

remcohaszing avatar Nov 09 '23 14:11 remcohaszing