-
Notifications
You must be signed in to change notification settings - Fork 100
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
Add support for the contents of yew's html!
macro
#172
Comments
I think this could be even more general and work with the |
It's popular, sure, but not something to be added in the main grammar. You can try to implement injections similar to how nvim-treesitter does it instead If this were to be added, then adding every other "style" of macros for any semi popular lib will be advocated for as this would set a precedence. So for that reason, it shouldn't be added |
@ChrisRenfrow can you share your grammar? |
My apologies, I haven't started anything in regards to this issue and I don't have the time to contribute as I previously indicated. If anyone with the time to commit to this task would like to pick it up they're more than welcome to do so! |
@ChrisRenfrow actually, my bad, I read "While I've HAVE written my own tree-sitter grammar..." 🤦🏽♂️ |
Yew, a front-end web-framework for Rust similar to React, contains a
html!
macro for writing HTML and SVG code declaratively. I believe it makes sense to add support for these blocks in tree-sitter-rust, just as tree-sitter-javascript supports JavaScript syntax extension (jsx) to a similar end.Here is Yew's documentation on how the grammar within
html!
differs from proper HTML.While I've never written my own tree-sitter grammar, I am more than willing to take-on the implementation of this enhancement. If anybody has some time to spare I would appreciate some pointers on how to get started, otherwise I'm sure I can manage on my own. :)My availability has changed since I proposed this change and I can no longer contribute as I had offered.
The text was updated successfully, but these errors were encountered: