executablebooks / myst-vs-code

A syntax highlighter for the MyST Markdown format
https://marketplace.visualstudio.com/items?itemName=ExecutableBookProject.myst-highlight
MIT License
36 stars 15 forks source link

Add syntax highlighting for directives specified using the colon fence #56

Open jmarknixon opened 1 year ago

jmarknixon commented 1 year ago

Is your feature request related to a problem? Please describe. I love how the colon fence plugin renders directives that use it (for example, the note admonition) in previews. I'd like to see the plugin also perform syntax highlighting in the source.

Describe the solution you'd like When using the colon fence with a directive, I'd like to see the same highlighting I see when I use the backtick or tilde fence. See the attached screenshot.

Describe alternatives you've considered N/A

Additional context

Screenshot 2023-04-13 at 2 44 16 PM
welcome[bot] commented 1 year ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

atrnh commented 1 year ago

~@jmarknixon It looks like highlighting for colon fences was introduced in https://github.com/executablebooks/myst-vs-code/commit/81db9724125928743381a84088343430417388f7. So, according to the commit message, I think this feature should work if we add 'colon_fence' to the myst.preview.extensions setting.~

Nope, I'm totally wrong—that only enables colon fences rendering in the preview. Seems obvious now. Whoopsie 😅

LoicGrobol commented 7 months ago

Given the current structure of the extension ,this should probably go to https://github.com/chrisjsewell/vscode-myst-syntax