Commit graph

19 commits

Author SHA1 Message Date
Eli Zaretskii
e2b01d164c ; Fix last changes in php-ts-mode.el
* lisp/progmodes/php-ts-mode.el
(php-ts-mode--test-namespace-name-as-prefix-p)
(php-ts-mode--test-namespace-aliasing-clause-p)
(php-ts-mode--test-namespace-use-group-clause-p): Doc fixes.
(treesit-query-compile): Declare.
2024-09-28 15:06:44 +03:00
Vincenzo Pupillo
69d8f9d1b7
Fix php-ts-mode font-lock for latest PHP grammar (bug#73516)
Version 0.23 of the PHP grammar introduced some changes that
affect the font lock.

* lisp/progmodes/php-ts-mode.el
(php-ts-mode--language-source-alist): Update php, html, js and css
grammars version.
(php-ts-mode--parent-html-heuristic): Fix docstring
(php-ts-mode--test-namespace-name-as-prefix-p): New function.
(php-ts-mode--test-namespace-aliasing-clause-p): New function.
(php-ts-mode--test-namespace-use-group-clause-p): New function.
(php-ts-mode--font-lock-settings): Use the new functions.
2024-09-28 01:06:41 -07:00
Vincenzo Pupillo
3129315587
Improve php-ts-mode font lock and support latest grammar (bug#72796)
* lisp/progmodes/php-ts-mode.el:
(php-ts-mode--language-source-alist): Update the parser version.
(php-ts-mode--parent-html-heuristic): Fix commentary.
(php-ts-mode--keywords): Add "exit" keyword.
(php-ts-mode--predefined-constant): Added math constant.
(php-ts-mode--font-lock-settings): New and improved rules.
2024-08-26 00:48:35 -07:00
john muhl
7093504da2 ; Fix typos (bug#72167)
* lisp/minibuffer.el (completion-auto-deselect): Correct
spelling of "minibuffer".
* lisp/progmodes/peg.el (peg--actions): Correct spelling
of "post-processing".
* lisp/progmodes/php-ts-mode.el: Correct spelling of
"taken".
2024-07-18 08:23:13 +03:00
Vincenzo Pupillo
736b7cad40 Add jsdoc support to php-ts-mode in <script> element
In the <script> element, enable jsdoc embedding in JavaScript.
* lisp/progmodes/php-ts-mode.el
(php-ts-mode--language-source-alist): Add jsdoc to parser recipe.
(php-ts-mode): Add jsdoc parser check and a new rule for
'treesit-range-settings'.  Update the commentary section.
(Bug#71771)
2024-06-29 15:06:59 +03:00
Vincenzo Pupillo
d5c6eb1f96 Doc fix in 'php-ts-mode'
* lisp/progmodes/php-ts-mode.el
(php-ts-mode--custom-html-font-lock-settings): Doc fix.  (Bug#71759)
2024-06-27 01:47:27 +02:00
Stefan Kangas
fb11294d41 ; Fix typos 2024-06-23 16:40:06 +02:00
Eli Zaretskii
6f2036243f ; Doc fix in 'php-ts-mode'.
* lisp/progmodes/php-ts-mode.el (php-ts-mode-css-fontify-colors):
Doc fix.
2024-06-23 08:01:28 +03:00
Vincenzo Pupillo
2f1c882a16 Colorize CSS property value like `css--fontify-region'
If the value of a property is text representing a CSS color,
it will be fontified such that its background is the color
itself. 'php-ts-mode-css-fontify-colors' can be used to
disable this behaviour.
* lisp/progmodes/php-ts-mode.el (php-ts-mode-css-fontify-colors):
New custom var.
* lisp/progmodes/php-ts-mode.el (php-ts-mode--colorize-css-value):
New function.
* lisp/progmodes/php-ts-mode.el (php-ts-mode): Use the new
function.  (Bug#71724)
2024-06-23 07:57:52 +03:00
Vincenzo Pupillo
737fa7c529 Fix 'Customize' menu entry for 'php-ts-mode'
* lisp/progmodes/php-ts-mode.el (php-ts-mode-menu):
Replace menu entry with 'php-ts-mode' group.  (Bug#71723)
2024-06-23 07:50:55 +03:00
Vincenzo Pupillo
155cc89de0 Support for indentation of PHP alternative syntax control structures
For some control structures, PHP provides an alternative syntax.
A new rule has been added to handle this syntax.
* lisp/progmodes/php-ts-mode.el (php-ts-mode--indent-styles):
New rule for PHP alternative syntax.  (Bug#71710)
2024-06-22 12:42:10 +03:00
Vincenzo Pupillo
a4fe4ca93c Fix font lock regex for user defined constant in PHP
The old regex also captured functions with two or more
uppercase characters.  This new regex fixes that issue.
* lisp/progmodes/php-ts-mode.el (php-ts-mode--font-lock-settings):
New regex that match only user-defined constants.  (Bug#71593)
2024-06-22 11:48:50 +03:00
Stefan Kangas
f18a915690 ; Translate comment to English
* lisp/progmodes/php-ts-mode.el
(php-ts-mode--parent-html-heuristic): Translate comment to English.
2024-06-16 22:38:26 +02:00
Stefan Kangas
c0eefebabf ; Fix typos 2024-06-16 22:38:26 +02:00
Vincenzo Pupillo
13c4fc3dc7 Fix 'wrong-type-argument' in 'php-ts-mode--webserver-read-args'
Prevents php-ts-mode--webserver-read-args from throwing an
error if the current buffer is not associated with a file.
* lisp/progmodes/php-ts-mode.el (php-ts-mode--webserver-read-args):
Use 'default-directory if' the current buffer is not associated
with a file.  (Bug#71574)
(php-ts-mode-run-php-webserver): Fix doc string.
2024-06-15 21:52:45 +03:00
Eli Zaretskii
9b2e1b5e16 Avoid byte-compilation warnings in php-ts-mode
* lisp/progmodes/php-ts-mode.el (treesit-search-forward)
(treesit-node-prev-sibling, treesit-node-first-child-for-pos):
Declare.
2024-06-15 20:03:39 +03:00
Eli Zaretskii
9e8c0ec991 Fix problem with recently-added defcustom's
* lisp/progmodes/php-ts-mode.el (php-ts-mode-php-config)
(php-ts-mode-ws-port, php-ts-mode-ws-document-root)
(php-ts-mode-ws-workers): Fix :type and :safe attributes.
(Bug#71566)
2024-06-15 16:20:01 +03:00
Mattias Engdegård
59367f6a3a php-ts-mode: minor fixes
* lisp/progmodes/php-ts-mode.el (php-ts-mode-flymake-php):
Don't use `any` to mean `not-newline`; it's misleading.
(php-ts-mode--predefined-constant): Remove duplicate "E_USER_NOTICE".
2024-06-13 10:49:28 +02:00
Vincenzo Pupillo
e37754fc59 Add php-ts-mode
* etc/NEWS: Mention the new mode.
* lisp/progmodes/php-ts-mode.el: New file.  (Bug#71380)
2024-06-12 21:22:29 +03:00