zed/extensions/php/languages/php
Sylvain Brunerie 898d48a574
php: Add syntax highlighting inside heredoc strings (#18368)
PHP heredoc strings make it easy to define string literals over multiple
lines:

```php
    $someString = <<<EOT
        multiline
        text
        EOT;
```

That `EOT` identifier can be anything else, and it is actually being
used in Sublime Text and VS Code to inject syntax highlighting for
another language in said string, depending on the identifier. For
instance, if the identifier is SQL, SQL syntax highlighting will be
applied to the contents of the string. Likewise if the identifier is CSS
or JS.

```php
    $someString = <<<SQL
        SELECT *
        FROM my_table
        SQL;
```

This PR changes the PHP extension so that it supports that feature too.

Release Notes:

- php: Added syntax highlighting inside heredoc strings
2024-09-30 10:02:12 +03:00
..
brackets.scm php: Add bracket highlighting (#15881) 2024-08-06 17:36:40 -04:00
config.toml Extract PHP support into an extension (#9966) 2024-03-29 14:51:54 -04:00
embedding.scm Extract PHP support into an extension (#9966) 2024-03-29 14:51:54 -04:00
highlights.scm php: Remove invalid node types from highlights queries (#17680) 2024-09-10 23:37:37 -04:00
indents.scm php: Add auto-indent (#17545) 2024-09-10 17:41:37 -04:00
injections.scm php: Add syntax highlighting inside heredoc strings (#18368) 2024-09-30 10:02:12 +03:00
outline.scm assistant: Add annotations to more languages (#15866) 2024-08-07 13:47:21 +02:00
runnables.scm php: Update Pest tree-sitter queries to capture single quotes (#12467) 2024-05-30 16:37:41 +02:00
tags.scm Extract PHP support into an extension (#9966) 2024-03-29 14:51:54 -04:00
tasks.json php: Add runnable tests (#11514) 2024-05-22 13:49:20 +02:00