Support PHP 8.4 and more reliable indentation (bug#74525)
authorVincenzo Pupillo <v.pupillo@gmail.com>
Mon, 25 Nov 2024 10:06:02 +0000 (11:06 +0100)
committerYuan Fu <casouri@gmail.com>
Fri, 29 Nov 2024 04:47:22 +0000 (20:47 -0800)
commit9fdb764898dd4f40f562f8540767a18c827fe7d3
tree0a80355e19fbf466b183d60c3f77f1d665023d89
parentbda0bce9e4313c496fcfdcf4b6abeba3f68e5fac
Support PHP 8.4 and more reliable indentation (bug#74525)

Added support for PHP 8.4 property hook. More reliable CSS and
Javascript syntax indentation when there are attributes in
<script> and <style>.

* lisp/progmodes/php-ts-mode.el:
(php-ts-mode--language-source-alist): Switch to the latest php
grammar.
(php-ts-mode--js-css-tag-bol): CSS and Javascript indentation is
now more more reliable in different formatting styles.
(php-ts-mode--test-property-hook-clause-p): New function that
tests property_hook support.
(php-ts-mode--font-lock-settings): Use the new function.
(php-ts-mode--colorize-css-value): The function now behaves
exactly like the one in css-ts-mode.
(php-ts-mode--feature-list): Changed the list to match
css-ts-mode.
lisp/progmodes/php-ts-mode.el