Open stanholzendorf opened 1 year ago
isset
, empty
, echo
and print
are special keywords for syntax called language constructs, and count()
, printf()
, etc. are just functions. The different coloring is intentional design, as they have different syntactic semantics.
If you want to use coloring to spot misspellings in standard functions, you can add keywords like this:
(require 'php-defs)
(font-lock-add-keywords 'php-mode
`((,(regexp-opt (cdr (assq 'core php-defs-functions-alist)) 'symbols) . 'php-function-name)))
However, these supports are not accurate, so it is preferable to get support from static analysis tools like PHPStan.
Hello, Not sure if this is the right place to ask. Certain functions do not seem to have any highlighting. "isset" for example has but "count" for example has not. There are others as well. Is this something that is just missing or a problem on my end?