cjohansson / emacs-phps-mode

Emacs major mode for PHP with code intelligence
GNU General Public License v3.0
36 stars 2 forks source link

font locking of booleans #5

Closed mallt closed 5 years ago

mallt commented 5 years ago

@cjohansson First of all thanks a lot for creating this package! I've been comparing the font locking between phps-mode and php-mode, and I've noticed in phps-mode booleans are font locked as strings instead of constants:

afbeelding

Is there a chance this font locking could be changed or perhaps controlled by a customization variable?

Thanks!

cjohansson commented 5 years ago

The PHP Lexer has no token for booleans and this plugin uses syntax coloring for lexer tokens so it wouldn't make sense to use a special syntax coloring for booleans. Function names and booleans are lexed as T_STRING and therefore they have identical syntax coloring.

mallt commented 5 years ago

Ok I see, thank you for the explanation!