-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Comments
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. |
Any updates on this guys? I am desperately looking for something easy to work with mdx in neovim. |
|
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..
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:
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.The text was updated successfully, but these errors were encountered: