zhaouv / vscode-markdown-everywhere

Embed and highlight and preview markdown in any language which support line-comment or block-comment for vscode.
https://marketplace.visualstudio.com/items?itemName=zhaouv.vscode-markdown-everywhere
Apache License 2.0
9 stars 3 forks source link

[Feature request] Building custom rules on install #13

Open cdfa opened 2 months ago

cdfa commented 2 months ago

Hi, I am very happy that this extension allows me to add custom rules for markdown comments. This allows me to add support for Haskell. I wonder if it's possible to detect if any custom rules have been set when the extensions is installed/enabled and immediately build the embedding rules. I want to recommend others view my repository using the preview from this extension and it would be nice if they don't need to build the rules themselves and reload extensions, so it's a more seamless experience.

zhaouv commented 2 months ago

This feature is useful as it can help users automatically build after upgrading plugin versions. The details might involve calculating a hash value based on the version string and settings; if the hash value differs, it triggers a build. However, I don't think I would use it frequently, so I don't plan to implement it. You can send a pr for it.

zhaouv commented 2 months ago

Thanks for the suggestion. I will directly implement the ones that I think I will use more often, such as exporting Markdown. The others will be temporarily kept in the issue.

cdfa commented 2 months ago

I looked into this and while rebuilding the custom rules when the extension activates is easy enough, I don't think it's possible to do it before the extension is loaded and the activation events are registered.

The issue can be closed as far as I'm concerned.

cdfa commented 2 months ago

I did add Haskell and Purescript support in #16, so I don't need my custom rules anymore :)