zserio
zserio copied to clipboard
Provide syntax-highlighting-files
Would be great to have correct syntax highlighting of zs in typical editors like vim or sublime text. Maybe you could even create a pull-request for https://github.com/github/linguist later which would also enable correct highlighting in github comments.
Hi, failing to find a decent IDE support for zserio, I've got a chance to implement a VS Code extension myself. It provides highlighting, syntax checking, and basic symbol navigation.
You can get it from https://marketplace.visualstudio.com/items?itemName=4og.zserio-language-support Feedback is highly appreciated.
Hi @4og, I just tried your extension and it's really great! I have tired to make at least simple syntax highlighting once, but I never had time to finish it. But your extension is far better :+1: . There is some space for improvement of the syntax highlighting yet, e.g. type of the field is not highlighted, but since it's version 0.4.0, it works really very well. Thank you for sharing it!
Do you know if some stuff from your extension could be reused for other IDEs? Or if it would be possible to use it for "integration" with github - currently github says that *.zs is a ZenScript :-) and markdown of course doesn't know the zserio syntax as well.
I think we should once in a while add a section of community links to the zserio README where we can reflect all these helpful tools and repos that are built around zserio and are somewhat hidden in the dark. A first shortlist could include:
https://github.com/4og/zserio-language-support https://github.com/woven-planet/go-zserio https://github.com/Klebert-Engineering/zserio-cmake-helper https://github.com/Klebert-Engineering/zswag
Thanks for feedback! Support for type references highlighting can be done using a semantic token provider. It fairly easy to do, so I'm going to include it in the next release.
VS Code is using TextMate grammars for syntax highlighting, and they can be reused in other IDEs supporting TextMate bundles (Sublime, Atom, IntelliJ...). Linguist is also using TextMate, so it boils down to a submodule in https://github.com/github/linguist/tree/master/vendor/grammars. It might be hard to meet the popularity requirements, however. Theoretically, syntax checking and symbol navigation can also be extracted to a language server, but it's quite some effort.