tree-sitter / tree-sitter-rust

Rust grammar for tree-sitter
MIT License
340 stars 97 forks source link

Tweaks to code highlighting. Closes #149. #150

Closed jorendorff closed 2 years ago

jorendorff commented 2 years ago

Issue #149 explains what I'm trying to fix here (in case you're not a big fan of spot-the-differences puzzles).

Before:

image

After:

image

I'm a new contributor here, so please let me know if there's a test suite, CONTRIBUTING file, etc. that I should be looking at.

maxbrunsfeld commented 2 years ago

I'm a new contributor here, so please let me know if there's a test suite

Tree-sitter supports testing these highlight queries via files like this JavaScript example. If we wanted to set that up in this repo, we'd just create a test/highlights directory, and also move the existing corpus directory to test/corpus. I don't think you necessarily need to do that for this PR though.

jorendorff commented 2 years ago

OK, I think this is ready to go now.

I'm not a contributor in this repo, so I can't merge it.