yzhang-gh / vscode-markdown

Markdown All in One
https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one
MIT License
2.91k stars 322 forks source link

Support for 'explicit anchors' in autocomplete links #1465

Open sg-chris opened 1 week ago

sg-chris commented 1 week ago

Proposal

It would be awesome if 'Markdown All in One' could optionally support markdown headings that include 'explicit anchors' as part of its auto-complete.

I'm writing documentation using Docusaurus which contains 'explicit anchors' - https://docusaurus.io/docs/markdown-features/toc#heading-ids

For example, a link to this heading:

### Hello World {#my-explicit-id}

might look like this:

[Link](../path/to/file.mdx#my-explicit-id)

Other information

In my scenario, I'm writing API documentation which includes, methods + arguments and returns as headings and so these create 'ugly' anchors without using the explicit anchors.

So, rather than seeing this list of very long anchors, you'd see a list with the explicit anchors.

Screenshot 2024-09-24 at 18 05 45

Thanks 🙏