Skip to content
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

Rust's async await is not highlighted correctly #1534

Open
fanzeyi opened this issue Feb 2, 2021 · 2 comments
Open

Rust's async await is not highlighted correctly #1534

fanzeyi opened this issue Feb 2, 2021 · 2 comments

Comments

@fanzeyi
Copy link

fanzeyi commented Feb 2, 2021

Syntax:

async / await in Rust. For example:

async fn foo() {
  async_foo().await.await.await;
}

Currently it highlights as following:

image

It should be highlighting async and await as keywords.

Manually installing RustEnhanced can improve the situation:

image

I understand this is completely up to upstream (https://github.com/sublimehq/Packages), but given the upstream issue sublimehq/Packages#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
@sharkdp
Copy link
Owner

sharkdp commented Feb 16, 2021

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.

@marcospb19
Copy link

I'm having problems with syntax highlighting too:

image

So I'd suggest using rust-enhanced instead because it fixes the problem.

@Enselic Enselic added help wanted Extra attention is needed syntax-highlighting labels May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants