bat
bat copied to clipboard
Rust's async await is not highlighted correctly
Syntax:
async / await in Rust. For example:
async fn foo() {
async_foo().await.await.await;
}
Currently it highlights as following:
![image](https://user-images.githubusercontent.com/409951/106554878-2795c000-64d1-11eb-8075-d42d3ec5e4d0.png)
It should be highlighting async
and await
as keywords.
Manually installing RustEnhanced can improve the situation:
![image](https://user-images.githubusercontent.com/409951/106554921-43996180-64d1-11eb-896e-e64153780ea2.png)
I understand this is completely up to upstream (https://github.com/sublimehq/Packages), but given the upstream issue https://github.com/sublimehq/Packages/pull/2305 is hinged. I wonder if it makes sense to have bat bundle https://github.com/rust-lang/rust-enhanced/ directly.
In #906 the same idea was rejected with the reasoning that const generic was not stablized hence the breakage was not considered as a bug. However, async await in Rust have been stabilized for more than a year now. It is surprizing to see bat still can't highlight it correctly. Can we re-consider the decision?
Thanks.
Quick instructions for anyone searching this in the future:
mkdir -p "$(bat --config-dir)/syntaxes"
cd "$(bat --config-dir)/syntaxes"
git clone https://github.com/rust-lang/rust-enhanced.git
bat cache --build
In #906 the same idea was rejected with the reasoning that const generic was not stablized hence the breakage was not considered as a bug. However, async await in Rust have been stabilized for more than a year now. It is surprizing to see bat still can't highlight it correctly. Can we re-consider the decision?
Yes, thanks.
I'm having problems with syntax highlighting too:
So I'd suggest using rust-enhanced
instead because it fixes the problem.