Skip to content

MDX Extension for VSCode doesn't support IntelliSense link path completion for # and ## triggers in .mdx files #482

@yokaiichi

Description

@yokaiichi

Initial checklist

Affected packages and versions

MDX unified v1.8.11

Link to runnable example

No response

Steps to reproduce

  1. On a Mac system, install VSCode 1.94.0 or later, and install the MDX unified Extension v1.8.11.

  2. In a repo, create two sibling folders. In one folder place two files A.mdx and B.mdx. In the other folder place a single file C.mdx.

  3. In A.mdx create several different ## sections and dummy paragraphs in each section. Do the same for B.mdx and C.mdx.

  4. In A.mdx, in any paragraph, add an empty Markdown link [anchorText](). Place your cursor in the empty link destination delimiters (), trigger IntelliSense autocomplete (Control + Space) and type # to attempt to view autocomplete link paths to headers within the same A.mdx file. Nothing will happen; IntelliSense is not recognizing the # trigger.

  5. Try a variation of this by removing the # and this time typing two hash marks ## to attemp to view autocomplete link paths to headers across ALL files including B.mdx and C.mdx. Nothing will happen; IntelliSense is not recognizing the ## trigger.

  6. Now try all this again with three non-MDX files A.md, B.md, and C.md. You'll see that IntelliSense fully recognizes and acts on both the # and ## triggers in regular .md files.

Expected behavior

IntelliSense recognizes both # and ## triggers for link path completion behavior, exactly as it does in regular .md files.

Additional details from Discussion in mdx-js

Actual behavior

IntelliSense does absolutely nothing in response to # and ## triggers for link path completion in .mdx files, even with the most recent (v1.8.11) MDX unified Extension installed in the most recent version of VSCode (v1.94.0) for Mac.

Affected runtime and version

node v20.18.0

Affected package manager and version

npm v10.9.0

Affected OS and version

macOS Sonoma 14.6.1

Build and bundle tools

Docusaurus

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 type/bugThis is a problem👍 phase/yesPost is accepted and can be worked on👶 semver/patchThis is a backwards-compatible fix🗄 area/interfaceThis affects the public interface🙆 yes/confirmedThis is confirmed and ready to be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions