Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a Language Server for MDX files #1599

Closed
michaeljota opened this issue Jul 25, 2021 · 4 comments
Closed

Create a Language Server for MDX files #1599

michaeljota opened this issue Jul 25, 2021 · 4 comments
Labels
👀 no/external This makes more sense somewhere else

Comments

@michaeljota
Copy link

Subject of the feature

MDX 2.0 is improving its support with TS but in order to get more from it, and be able to have feedback from editors, we need a Language Server that can handle the syntax of an MDX file.

Problem

Currently, when editing a .mdx file, by default VSCode treats it as a plain text file.

image.

Expected behavior

MDX files should support highlighting, autocomplete, type-checking, better formatting, and other things that improve the quality of experience while developing.

Alternatives

There is an extension MDX that Provides syntax highlighting and bracket matching for MDX (JSX in Markdown) files.

So, the above code snippet would look like this:

image

But, this is only for highlighting in MDX files.

Other considerations

There is currently an issue in the TS repo asking for support of MDX files microsoft/TypeScript#36440, but for the TS LS to support this, TS itself needs work on other open issues. However, in the same ticket, you can see a member suggest an MDX LS deal with this.

.vue files used to suffer for this kind of behavior as well. But with the Vue Language Server and the vuejs/vetur plugin (that implements the VLS) you know have a rich experience while editing .vue files.

@ChristianMurphy
Copy link
Member

@ChristianMurphy ChristianMurphy added 👀 no/external This makes more sense somewhere else and removed 🔍 status/open 🦋 type/enhancement This is great to have labels Jul 25, 2021
@remcohaszing
Copy link
Member

remcohaszing commented Dec 17, 2021

I actually think it may be worthwhile to create this as a language server. This could then be consumed by various editor integrations, including vscode-mdx, vim, neovim, atom, and more.

Also language servers can use ESM, which VSCode plugins can’t.

This is not the same as the unified-language-server based projects I’m working on. Those provide editor compatibility with the unified CLIs. The MDX language server could instead focus on code completion, type hints, code navigation, etc.

@ShivamJoker
Copy link

Any updates on this guys? I am desperately looking for something easy to work with mdx in neovim.

@wooorm
Copy link
Member

wooorm commented Jan 1, 2023

  • Not everyone in this conversation is a guy
  • This issue is closed, and refers to different places, there will not be updates here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👀 no/external This makes more sense somewhere else
Development

No branches or pull requests

5 participants