Closed
Description
Summary
Based on a bisect from the 23.05 release, it seems like #7621 caused the highlighting of the sqlx query macros to stop working:
Before:
After:
I think this is because the injection query for normal macros overwrites the whole thing, when really we just want the nested query to be SQL and the rest should be Rust:
helix/runtime/queries/rust/injections.scm
Lines 4 to 7 in 68c7537
There's also a smaller regression that #6793 removed the highlighting for query_unchecked
that #6256 introduced but that is fairly easy to fix :)
Reproduction Steps
I tried this:
hx
on a Rust file with any sqlx query, such assqlx::query!("SELECT id FROM posts")
I expected this to happen:
The SQL string should be highlighted properly.
Instead, this happened:
It is just highlighted as a normal Rust string.
Helix log
N/A
Platform
Linux
Terminal Emulator
Kitty
Helix Version
23.05-498-g68c7537d