We're missing highlighting for :: -> ... and #[ , as well as keywords such as exit, unset or var, and the $ sign is not an operator but part of a variable name; variables look awful otherwise. I've modified highlights.scm for this with these changes (but I couldn't get var to work):
@@ -70,18 +70,20 @@
; Variables
+(variable_name
+ "$" @punctuation.special
+ (name) @variable)
@@ -153,9 +155,19 @@
"@"
- "$"
+ "::"
+ "->"
+ "..."
] @operator
+; Delimiters
+
+[
+ ","
+ ";"
+ "=>"
+] @punctuation.delimiter
+
; punctuation
@@ -165,6 +177,7 @@
"]"
"{"
"}"
+ "#["
] @punctuation.bracket
@@ -195,8 +208,8 @@
"endswitch" @keyword
"endwhile" @keyword
"extends" @keyword
+"exit" @keyword
"final" @keyword
"finally" @keyword
"for" @keyword
"foreach" @keyword
@@ -228,6 +241,7 @@
"throw" @keyword
"trait" @keyword
"try" @keyword
+"unset" @keyword
"use" @keyword
"while" @keyword
"xor" @keyword
We're missing highlighting for :: -> ... and #[ , as well as keywords such as exit, unset or var, and the $ sign is not an operator but part of a variable name; variables look awful otherwise. I've modified highlights.scm for this with these changes (but I couldn't get var to work):