alex-pinkus / tree-sitter-swift

A tree-sitter grammar for the Swift programming language.
MIT License
137 stars 35 forks source link

Odd syntax highlighting on GitHub #414

Open fwcd opened 4 months ago

fwcd commented 4 months ago

IIUC this is the grammar that GitHub currently uses for Swift syntax highlighting. If not, feel free to close this issue.

I have noticed a few odd things about the way Swift files are highlighted. For example:

alex-pinkus commented 4 months ago

I have highlight queries in this repo for import, while, if, and guard, so I’m not sure why this isn’t working. Perhaps @patrickt knows how highlight queries get mapped to styles on GitHub and can help here.

patrickt commented 1 month ago

Hm, that’s weird. I’ll pull in the latest crate and see if that solves it. (Sorry for taking so long to reply, my GH inbox is so bad it qualifies for federal cleanup funding.)

patrickt commented 1 month ago

I’m currently blocked (or at least deeply hindered) from upgrading due to the semver breakage in https://github.com/tree-sitter/tree-sitter/issues/3487. While this is not your fault, it means I will need some time before this can be fixed. Sorry 😞