executablebooks / myst-vs-code

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

✨ IMPROVE: Add support for Svelte chunks #32

Closed wlach closed 2 years ago

wlach commented 2 years ago

Currently the syntax highlighting isn't quite right, probably related to a bug in the underlying Svelte highlighter for vscode:

https://github.com/sveltejs/language-tools/issues/1094

I'd like to fix the above issue before asking this to be merged, but I thought I'd file this initial PR for feedback.

welcome[bot] commented 2 years ago

Thanks for submitting your first pull request! You are awesome! :hugs:
If you haven't done so already, check out EBP's Code of Conduct and our Contributing Guide, as this will greatly help the review process.
Welcome to the EBP community! :tada:

chrisjsewell commented 2 years ago

cheers will have a check when you are ready to merge, but looks about right

wlach commented 2 years ago

I rabbitholed a bunch on why this wasn't working and am now pretty certain there's no issue with this plugin, the problem seems to be a limitation in VSCode which applies equally to markdown documents as it does to MyST ones. I'm sure it'll be figured out one way or another, but in the mean time I see no reason to delay merging this PR. Once the upstream issue(s) are fixed svelte syntax highlighting should start working as expected. In the mean time I think the incorrect syntax highlighting is still slightly preferable to not doing anything for these types of code chunks.

welcome[bot] commented 2 years ago

Congrats on your first merged pull request in this project! :tada: congrats
Thank you for contributing, we are very proud of you! :heart: