rust: Fix rstml injection inside Leptos view! macros#45952
rust: Fix rstml injection inside Leptos view! macros#45952MrSubidubi merged 1 commit intozed-industries:mainfrom
rstml injection inside Leptos view! macros#45952Conversation
|
We require contributors to sign our Contributor License Agreement, and we don't have @ArhanChaudhary on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
We require contributors to sign our Contributor License Agreement, and we don't have @ArhanChaudhary on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
view! macrosrshtml injection inside Leptos view! macros
MrSubidubi
left a comment
There was a problem hiding this comment.
Nice digging and sorry for breaking this, looks good! Thank you for the fix.
As for
On a related note, I am not sure why language injection for the sql macro is there, which is not even exported by sqlx. The commit author #41258 (comment) that it is for sqlez, a Go library, not a Rust crate.
We have a sqlez crate living within this very repo that this injection is for. E.g.,
zed/crates/component_preview/src/persistence.rs
Lines 14 to 23 in fa4eaf4
Lastly, congratulations to your first contribution! 🎉
rshtml injection inside Leptos view! macrosrstml injection inside Leptos view! macros
Fix the Rust tree-sitter language injection to syntax highlight HTML in Leptos `view!` macros. A [cleanup commit](00278f4#diff-15e953fedef2880e09d9e57c8bddf9af5eb583b141fe7d2069c8e579378f4fccL6) erroneously removed the `(#not-any-of? @_macro_name "view" "html")` filter from a query that injects Rust into macro invocations. This causes the query to always match with higher precedence over another one that sets the `view!` macro language to `rstml`. I have verified that my fix works locally. On a related note, I am not sure why language injection for the `sql` macro is there, which is not even exported by [sqlx](https://docs.rs/sqlx/latest/sqlx/). The commit author [mentions](#41258 (comment)) that it is for `sqlez`, a Go library, not a Rust crate. Release Notes: - Fixed rshtml injection not working inside Leptos `view!` macros.
…ries#45952) Fix the Rust tree-sitter language injection to syntax highlight HTML in Leptos `view!` macros. A [cleanup commit](zed-industries@00278f4#diff-15e953fedef2880e09d9e57c8bddf9af5eb583b141fe7d2069c8e579378f4fccL6) erroneously removed the `(#not-any-of? @_macro_name "view" "html")` filter from a query that injects Rust into macro invocations. This causes the query to always match with higher precedence over another one that sets the `view!` macro language to `rstml`. I have verified that my fix works locally. On a related note, I am not sure why language injection for the `sql` macro is there, which is not even exported by [sqlx](https://docs.rs/sqlx/latest/sqlx/). The commit author [mentions](zed-industries#41258 (comment)) that it is for `sqlez`, a Go library, not a Rust crate. Release Notes: - Fixed rshtml injection not working inside Leptos `view!` macros.
…ries#45952) Fix the Rust tree-sitter language injection to syntax highlight HTML in Leptos `view!` macros. A [cleanup commit](zed-industries@00278f4#diff-15e953fedef2880e09d9e57c8bddf9af5eb583b141fe7d2069c8e579378f4fccL6) erroneously removed the `(#not-any-of? @_macro_name "view" "html")` filter from a query that injects Rust into macro invocations. This causes the query to always match with higher precedence over another one that sets the `view!` macro language to `rstml`. I have verified that my fix works locally. On a related note, I am not sure why language injection for the `sql` macro is there, which is not even exported by [sqlx](https://docs.rs/sqlx/latest/sqlx/). The commit author [mentions](zed-industries#41258 (comment)) that it is for `sqlez`, a Go library, not a Rust crate. Release Notes: - Fixed rshtml injection not working inside Leptos `view!` macros.
Fix the Rust tree-sitter language injection to syntax highlight HTML in Leptos
view!macros.A cleanup commit erroneously removed the
(#not-any-of? @_macro_name "view" "html")filter from a query that injects Rust into macro invocations. This causes the query to always match with higher precedence over another one that sets theview!macro language torstml. I have verified that my fix works locally.On a related note, I am not sure why language injection for the
sqlmacro is there, which is not even exported by sqlx. The commit author mentions that it is forsqlez, a Go library, not a Rust crate.Release Notes:
view!macros.