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

Inject markdown syntax for rust doc_comments #3391

Open
A-Walrus opened this issue Aug 11, 2022 · 4 comments · May be fixed by #9695
Open

Inject markdown syntax for rust doc_comments #3391

A-Walrus opened this issue Aug 11, 2022 · 4 comments · May be fixed by #9695
Labels
A-tree-sitter Area: Tree-sitter C-enhancement Category: Improvements

Comments

@A-Walrus
Copy link
Contributor

Describe your feature request

Since rust doc comments support markdown it would be nice to highlight it as such. Especially useful for code within doc comments for which the language should be injected into the markdown which is injected into rust.

@A-Walrus A-Walrus added the C-enhancement Category: Improvements label Aug 11, 2022
@CptPotato
Copy link
Contributor

If implemented I would prefer this to be optional. Having full markdown highlighting in comments would probably distract me a lot from the actual code.

@kirawi kirawi added A-tree-sitter Area: Tree-sitter upstream labels Aug 11, 2022
@kirawi
Copy link
Member

kirawi commented Aug 11, 2022

@the-mikedavis
Copy link
Member

tree-sitter/tree-sitter-rust#168 looks promising for this. It works the same as #4870

@the-mikedavis
Copy link
Member

As mentioned in #9695 this is now possible with a change to the grammar which was merged upstream. There's a bug in the highlighter though #6491 that makes injecting markdown very noisy. That should be fixed when we switch over to the new highlighter @pascalkuthe is working on (tracked in #10286) and then we should be able to enable markdown injections for rust doc comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tree-sitter Area: Tree-sitter C-enhancement Category: Improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants