Skip to content
This repository was archived by the owner on May 16, 2025. It is now read-only.

feat(extensions): register commands and providers also for MDX files - #173

Open
vecerek wants to merge 1 commit into
shikijs:mainfrom
vecerek:support-mdx
Open

vecerek wants to merge 1 commit into
shikijs:mainfrom
vecerek:support-mdx

Conversation

@vecerek

@vecerek vecerek commented Nov 5, 2022 •

Copy link
Copy Markdown

I found that the MDX plugin chose mdx as the language identifier. This PR updates all places where commands/providers are registered to also include mdx files. It also adds an additional activation event for the mdx language.

This PR fixes the issue of auto-completion not working in MDX files (#172). However, syntax highlighting of TypeScript code within JSX blocks still doesn't work. Which part of the code is responsible for the highlighting? I couldn't figure it out just by reading the code and I couldn't make the debugger work, either.

Would you have any pointers for me, @orta?

UPDATE: after playing a bit around with mdx, I noticed that it's also other language code samples that aren't highlighted. I think this indicates that it is the MDX vs code extension that's missing the code highlighting feature.
And indeed, it seems like that extension is having many highlighting bugs, example: mdx-js/mdx-analyzer#209.

Screenshot 2022-11-06 at 01 55 01

@changeset-bot

changeset-bot Bot commented Nov 5, 2022

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 69de1f9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@kamranayub

Copy link
Copy Markdown

It would be awesome to have this; all our new docs are in MDX for Docusaurus. It would definitely enhance the contributor DX to have this working.

This branch has not been deployed

No deployments
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants