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 a wit.wasm grammar file.
Create issues in https://github.com/bytecodealliance/vscode-wit and https://github.com/liamwh/tree-sitter-wit to support newer component model syntaxes:
WIT code is currently unhighlighted as highlight.js does not support WIT currently. Using the
mdbook-treesitterpreprocessor 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-treesitteroutputs grammar logic used for highlighting as dylib file (wit.so) and work is needed adding emscripten support to output awit.wasmgrammar file.Create issues in https://github.com/bytecodealliance/vscode-wit and https://github.com/liamwh/tree-sitter-wit to support newer component model syntaxes:
list<u8, 4>streamandfuturetypes