Skip to content

Highlight Rust async and await as keywords - #3849

Draft
coyaSONG wants to merge 2 commits into
sharkdp:masterfrom
coyaSONG:fix/rust-async-await
Draft

Highlight Rust async and await as keywords#3849
coyaSONG wants to merge 2 commits into
sharkdp:masterfrom
coyaSONG:fix/rust-async-await

Conversation

@coyaSONG

Copy link
Copy Markdown

Summary

  • extend bat's existing Rust syntax patch so async and await use the control-keyword scope
  • add the issue's async function and chained .await expression to the Rust syntax fixture
  • commit the regenerated highlighted fixture while leaving generated binary asset caches out of the pull request

Closes #1534.

Root cause

bat's pinned Sublime Packages revision predates Rust async/await syntax, so both tokens fell through to ordinary identifier styling.

Validation

  • verified the updated patch applies cleanly to the exact pinned syntax source
  • ran the full repository asset builder successfully
  • rebuilt bat and confirmed async/await render with the Rust control-keyword color while async_foo remains a function identifier
  • confirmed the committed Rust fixture is byte-identical to a fresh focused render
  • cargo fmt --check
  • cargo test --locked
  • git diff --check

AI assistance

OpenAI Codex was used to inspect the issue and repository guidance, implement the change, and run the checks listed above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rust's async await is not highlighted correctly

1 participant