-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Zed Support #458
Comments
It’s cool to hear people want this. I’m not sure if this repo is the right place to maintain Zed integration though. Perhaps it’s better if Zed adds their own integration. See zed-industries/extensions#203 (comment). This is not a definite no. It could be nice to support this from the MDX side if Zed doesn’t want to maintain it. |
Hi! Thanks for taking the time to contribute! This has been marked by a maintainer as needing more info. It’s not clear yet whether this is an issue. Here are a couple tips:
Thanks, |
👍 on what remco says there. |
By the way, Zed uses TreeSitter grammars instead of TM, although that wouldn't matter that much AFAIK since we provide the language server anyways. |
|
I thought that it's possible to provide syntax highlighting just with a language server. Isn't that true? If not a TreeSitter grammar should be worked on for sure 🥲 |
LSP supports semantic tokens, which can be used to enhance syntax highlighting based on context, for example: // Is Thing a class? function? interface? This can be determined using semantic tokens
import { Thing } from 'module' But basic syntax highlighting happens in a grammar such as TextMate, Monarch, or TreeSitter. |
Can only TreeSitter syntaxes expose those semantic tokens? Could they be exposed from TextMate grammars? 🤔 |
No, the language server exposes them. The point is, yes, the language server enhances syntax highlighting a bit, so you may find some info about that when you search a bit. But it doesn’t provide most highlighting, that’s something for grammars to provide. |
right 👍 it just feels a bit out of place to me for LSP to do that |
This comment was marked as resolved.
This comment was marked as resolved.
The Zed team is free to reach out if they want to implement MDX support, but it’s not actionable for us right now. |
Initial checklist
Problem
Zed is a VSCode-like code editor that has recently gained some popularity. However, it currently doesn't have MDX support, either in first-party integrations or third-party extensions. (see zed-industries/extensions#203)
Solution
Creating an extension for Zed would have a great impact here. Since many Zed extensions work with the LSP protocol, it'd be definitely possible to integrate the MDX language server with Zed, especially considering that other Volar-based language servers like Vue and Astro already support Zed.
Alternatives
Recommend users to stay on VSCode and do nothing
The text was updated successfully, but these errors were encountered: