-
Notifications
You must be signed in to change notification settings - Fork 63
Add syntax highlighting to WIT documentation #238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Having WIT syntax highlighting would be great. @mkatychev have you explored updating a |
@kate-goldenring I think the advantages of using tree-sitter over base highlight.js are pretty significant overy hand implementing highlight.js:
|
Taking a look at the |
Yep, that's what it does without the duplicitous maintenance oh having a separate highlight.js grammar to maintain! |
WIT code is currently unhighlighted as highlight.js does not support WIT currently. Using the
mdbook-treesitter
preprocessor is a good avenue to add syntax highlighting for all WIT codeblocks in the documentation, working example of it in action:https://mkatychev.github.io/component-docs/design/wit.html#worlds
Caveat:
Current
mdbook-treesitter
outputs grammar logic used for highlighting as dylib file (wit.so
) and work is needed adding emscripten support to output awit.wasm
grammar file.The text was updated successfully, but these errors were encountered: