You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unsure whether there would be a need to make changes to how the comment block scopes work as they might be all separate per line, which might be an issue for Markdown code going over multiple lines. Is this something that VS Code supports? For example:
/// _Will this next line/// still be italic?_asyncfnfoo() -> Result<()>{// ...}
The "JSDoc Markdown highlighting" extension by @mattbierner implements this functionality solely via grammar injection in very few lines of code. @matklad mentions an injection approach should also be taken in the aforementioned rust-analyzer issue, though I'm uncertain if grammar injection was referred to. Should we go a similar route or could we directly implement it with embedded languages?
Is this not implemented in the TypeScript extension due to TypeScript not using Markdown like Rust? I hope this is something we could add the the Rust extension as Rust chose Markdown specifically.
The text was updated successfully, but these errors were encountered:
This is a continuation of #98437 which was closed as it was a duplicate issue from the Atom Rust extension, though that is archived now.
VS Code makes it possible to embed languages by specifying it in the grammar list of the extension. Would it be possible to make the Rust grammar include Markdown for its comment blocks? I am willing to see if this is possible using something like the following in https://github.com/microsoft/vscode/blob/main/extensions/rust/package.json:
This was mentioned in rust-lang/rust-analyzer#3495 and a proof of concept was done in rust-lang/rust-analyzer#4488 by @Veetaha, though it seems like the most ideal location would perhaps be to make VS Code aware of this?
I am unsure whether there would be a need to make changes to how the comment block scopes work as they might be all separate per line, which might be an issue for Markdown code going over multiple lines. Is this something that VS Code supports? For example:
The "JSDoc Markdown highlighting" extension by @mattbierner implements this functionality solely via grammar injection in very few lines of code. @matklad mentions an injection approach should also be taken in the aforementioned rust-analyzer issue, though I'm uncertain if grammar injection was referred to. Should we go a similar route or could we directly implement it with embedded languages?
Is this not implemented in the TypeScript extension due to TypeScript not using Markdown like Rust? I hope this is something we could add the the Rust extension as Rust chose Markdown specifically.
The text was updated successfully, but these errors were encountered: