Hi all, I've started working on a syntax highliter for *.wit
using TextMate suggested by VSCode and a VSCode extension. My goal is to publish it so that we get proper syntax highligher rendering in multiple text editors, including vim, emacs, vscode, and GH markdown. Bonus point for getting Github code review rendering working.
I am a newbie on writing something like this and it will take some time. I would greatly appreciate if people can confirm that we don't have other people working on the same thing right now! :pray:
Stay tuned and will update on this stream when it's availble to try out!
Awesome, thanks Mossaka! Happy to help test when you're ready.
I wrote this long ago if it's at all helpful reference: https://github.com/lann/vscode-wit/
Oh nice! I will take a look later
I also have something I was working on that I think is in a pretty good state instead of having to start from scratch. @Mossaka (Joe) , I think we should ask for a repo in the bytecode alliance GitHub organization to concentrate the effort in one place, right?
Agreed! That's great.
FYI @Bailey Hayes we probably need a repo in the BCA organization to put this effort in one place.
Nice! What should it be called?
i think we should call it wit-idl
In the meantime, here is a sneak peek of the vscode extension: wit-idl-0.0.1.vsix
Eduardo Rodrigues said:
In the meantime, here is a sneak peek of the vscode extension: wit-idl-0.0.1.vsix
Just tried this. This is awesome and it looks like it covers the most up-to-date syntax of WIT! Great work @Eduardo Rodrigues It seems like I don't need to finish my syntax highlighter anymore
I've noticed that the highlighters for import's name and export's name are slightly different. Is that intentional?
It seems like the union
type has made it not work for interfaces and worlds that are defined after the first interface image.png
The import and export are different on purpose because they are following the same convention as set in the typescript grammar
For the second one, it is definitely a bug
I can help to fix it if you have the source code published somewhere
the bug has been fixed now i believe. there you go: https://github.com/eduardomourar/wit-idl
A few improvements have been made to the VSCode extension and a new version has been released: https://github.com/eduardomourar/wit-idl/releases/download/wit-idl-v0.0.6/wit-idl-v0.0.6.vsix
@Djordje Lukic I think you have one, too, right? Have a look at @Eduardo Rodrigues's version -- let's see if we can bring people together!
We have a public repository for the WIT extension here: https://github.com/bytecodealliance/vscode-wit and we are working to get that published to the Visual Studio Marketplace.
already using it, already happy. Hey, are you thinking of adding tooltips to structures, to help people to learn what values represent?
Not in the short-term because that requires a language server and AFAIK we don’t have one for WIT at this moment.
we'd better get on that, methinks. :-)
We finally have syntax highlighting for WIT available in github: https://github.com/bytecodealliance/vscode-wit/issues/7#issuecomment-1604764911
Last updated: Nov 22 2024 at 16:03 UTC