VSCode: how to combine Marp preview with Markdown-It contributions from other extensions? #176
-
Hi, I am the developer of Argdown. I am currently trying to figure out how to integrate Argdown with Marp. The Argdown VSCode extension already contributes a MarkdownIt plugin to the Markdown preview to transform Argdown code snippets into argument maps. However, this does not work if I activate Marp for the Markdown document (using If you are using your own instance of MarkdownIt, is it possible to configure it to install plugins? So far I have only found out that I can add Markdown plugins to the Marp cli. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Thank you for your interest in contributing to Marp extension! 😆
If marked the document as Marp Markdown via Pre-released versions had actually supported extending Marp engine through other extensions. But we could not take this approach because there were feedbacks from early users about confliction with other major extensions, such as marp-team/marp-vscode#9. Because the most of extensions are designed for VS Code preview, not for Marp, we have thought that to keep extensibility as the same level as VS Code's markdown extensions will be hard in the point of view from maintainability and security1.
Not yet. We had planned markdown-it plugin support powered by a project setting for Marp CLI in marp-team/marp-vscode#194, but I feel your suggestion looks sweet too. We are welcome to discuss about the design of contribution point for extensible Marp engine 😄 Footnotes |
Beta Was this translation helpful? Give feedback.
-
Thanks for your answer, I should have looked for related issues in marp-team/marp-vscode first. I just did a little bit of research on how two extensions can communicate which each other. The most helpful information I could find was this Stackoverflow answer by Matt Bierner. If I understand it correctly, I could call Edit: Here is an example in the docs. I am not sure if that would always work from the activate function of the Argdown extension (maybe the Marp extension will be activated after the Argdown extension. Would that be a problem?). It would be even better if this would work in a more declarative manner. In that case the Marp extension would add its own contribution point that other extensions can use in their |
Beta Was this translation helpful? Give feedback.
Thank you for your interest in contributing to Marp extension! 😆
If marked the document as Marp Markdown via
marp: true
, Marp for VS Code will try to parse and render Markdown by using Marp's markdown-it engine instead of VS Code's markdown-it. markdown-it plugins for VS Code's engine provided by the VS Code extension are not covered in Marp…