colinta / decent-swift-syntax

Uses the new `sublime-syntax` format, which is super easy to work with.
MIT License
62 stars 12 forks source link

Missing preprocessor tokens #25

Closed rwols closed 4 years ago

rwols commented 4 years ago

Handling of preprocessor tokens is missing:

image
colinta commented 4 years ago

Screen Shot 2020-10-12 at 9 53 34 AM

The # is being marked as punctuation.definition.preprocessor (I'll addd meta.preprocessor.swift here) and the if/endif are being marked as meta.preprocessor.c (I'll change this to meta.preprocessor.swift), which in my color scheme look like the above.

rwols commented 4 years ago

The meta scopes are not supposed to be highlighted by a .sublime-color-scheme. The C syntax uses keyword.control for all of these preprocessor keywords. Consider adding keyword.control for Swift, too.

colinta commented 4 years ago

I followed the guidelines at https://www.sublimetext.com/docs/scope_naming.html#meta - and zenburn works well for me. A PR is welcome, but I don't have a way of testing these changes, and so I don't have an easy path to implement them.