|
83 | 83 | "PHP keywords for tree-sitter font-locking.")
|
84 | 84 |
|
85 | 85 | (defvar php-ts-mode--operators
|
86 |
| - '(("!=" "!==" "%" "%=" "&" "&&" "&=" "*" "**" "*=" |
| 86 | + '("!=" "!==" "%" "%=" "&" "&&" "&=" "*" "**" "*=" |
87 | 87 | "+" "++" "+=" "," "-" "-" "--" "-=" "->" "."
|
88 | 88 | ".=" "/" "/=" ":" "::" "<" "<<" "<<=" "<=" "<=>"
|
89 | 89 | "<>" "=" "==" "===" "=>" ">" ">=" ">>" ">>=" "?"
|
90 |
| - "??" "??=" "?->" "@" "\\" "^" "^=" "|" "|=" "||")) |
| 90 | + "??" "??=" "?->" "@" "\\" "^" "^=" "|" "|=" "||") |
91 | 91 | "PHP operators for tree-sitter font-locking.")
|
92 | 92 |
|
93 | 93 | (defconst php-ts-mode--magical-constants
|
@@ -202,22 +202,17 @@ the available version of Tree-sitter for PHP."
|
202 | 202 | ]
|
203 | 203 | @font-lock-string-face)
|
204 | 204 |
|
205 |
| - :language 'php |
206 |
| - :feature 'interpolation |
207 |
| - `((interpolation "${" @font-lock-misc-punctuation-face) |
208 |
| - (interpolation "}" @font-lock-misc-punctuation-face)) |
209 |
| - |
210 | 205 | :language 'php
|
211 | 206 | :feature 'operator
|
212 | 207 | `([,@php-ts-mode--operators] @font-lock-operator-face)
|
213 | 208 |
|
214 | 209 | :language 'php
|
215 |
| - :feature 'string |
216 |
| - `((string) @font-lock-string-face) |
| 210 | + :feature 'keyword |
| 211 | + `([,@php-ts-mode--keywords] @font-lock-keyword-face) |
217 | 212 |
|
218 | 213 | :language 'php
|
219 |
| - :feature 'keyword |
220 |
| - `([,@php-ts-mode--keywords] @font-lock-keyword-face)) |
| 214 | + :feature 'bracket |
| 215 | + `((["(" ")" "[" "]" "{" "}"]) @font-lock-bracket-face)) |
221 | 216 | "Tree-sitter font-lock settings for `php-ts-mode'.")
|
222 | 217 |
|
223 | 218 | (defun php-ts-mode--defun-name (node)
|
@@ -283,9 +278,8 @@ Return nil if there is no name or if NODE is not a defun node."
|
283 | 278 | (setq-local treesit-font-lock-settings php-ts-mode--font-lock-settings)
|
284 | 279 | (setq-local treesit-font-lock-feature-list
|
285 | 280 | '((comment definition preprocessor)
|
286 |
| - (constant keyword string type variables) |
287 |
| - (annotation expression literal function) |
288 |
| - (bracket delimiter operator))) |
| 281 | + (keyword string type variables) |
| 282 | + (function bracket operator))) |
289 | 283 |
|
290 | 284 | ;; Imenu.
|
291 | 285 | (setq-local treesit-simple-imenu-settings
|
|
0 commit comments