|
74 | 74 | '("abstract" "as" "break" "case" "catch" "class" "const" |
75 | 75 | "continue" "declare" "default" "do" "echo" "else" |
76 | 76 | "elseif" "enddeclare" "endforeach" "endif" "endswitch" |
77 | | - "endwhile" "extends" "final" "finally" "foreach" |
| 77 | + "endwhile" "enum" "extends" "final" "finally" "foreach" |
78 | 78 | "function" "global" "if" "implements" "include_once" |
79 | 79 | "include" "insteadof" "interface" "namespace" "new" |
80 | 80 | "private" "protected" "public" "require_once" "require" |
@@ -118,14 +118,31 @@ the available version of Tree-sitter for PHP." |
118 | 118 |
|
119 | 119 | :language 'php |
120 | 120 | :feature 'type |
121 | | - `((primitive_type) @font-lock-type-face |
122 | | - (cast_type) @font-lock-type-face |
123 | | - (named_type (name) @type) @font-lock-type-face |
124 | | - (named_type (qualified_name) @type) @font-lock-type-face |
125 | | - (boolean) @font-lock-type-face |
126 | | - (null) @php-constant |
127 | | - (integer) @font-lock-number-face |
128 | | - (float) @font-lock-number-face) |
| 121 | + `([(primitive_type) |
| 122 | + (cast_type) |
| 123 | + (named_type (name) @type) |
| 124 | + (named_type (qualified_name) @type) |
| 125 | + (namespace_use_clause) |
| 126 | + (namespace_name (name)) |
| 127 | + (class_interface_clause (name)) |
| 128 | + (const_element (name)) |
| 129 | + (boolean)] @font-lock-type-face |
| 130 | + (null) @php-constant |
| 131 | + [(integer) |
| 132 | + (float)] @font-lock-number-face) |
| 133 | + |
| 134 | + :language 'php |
| 135 | + :feature 'definition |
| 136 | + `((class_declaration |
| 137 | + name: (name) @font-lock-type-face) |
| 138 | + (interface_declaration |
| 139 | + name: (name) @font-lock-type-face) |
| 140 | + (enum_declaration |
| 141 | + name: (name) @font-lock-type-face) |
| 142 | + (trait_declaration |
| 143 | + name: (name) @font-lock-type-face) |
| 144 | + (enum_case |
| 145 | + name: (name) @font-lock-type-face)) |
129 | 146 |
|
130 | 147 | :language 'php |
131 | 148 | :feature 'function |
@@ -267,7 +284,7 @@ Return nil if there is no name or if NODE is not a defun node." |
267 | 284 | (setq-local treesit-font-lock-feature-list |
268 | 285 | '((comment definition preprocessor) |
269 | 286 | (constant keyword string type variables) |
270 | | - (annotation expression literal) |
| 287 | + (annotation expression literal function) |
271 | 288 | (bracket delimiter operator))) |
272 | 289 |
|
273 | 290 | ;; Imenu. |
|
0 commit comments