From 18d317a993dc4db90e6404f1785f6f87b8a04d26 Mon Sep 17 00:00:00 2001 From: "Giuseppe.Esposito" Date: Sun, 1 Nov 2026 22:19:33 +0100 Subject: [PATCH 1/2] Send Twig, YAML and XML documents to PHPantom PHPantom answers completion, go-to-definition, references and rename for the names it reads in Twig templates and in YAML and XML configuration (services, routes, templates, translations). The files keep their language; the Twig, YAML and XML extensions keep serving them. Assisted-by: claude-code/claude-opus-5-5 --- extension.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extension.toml b/extension.toml index 8f63b5f..42bcc56 100644 --- a/extension.toml +++ b/extension.toml @@ -23,8 +23,8 @@ language_ids = { PHP = "php", Blade = "blade" } [language_servers.phpantom] name = "PHPantom" -languages = ["PHP", "Blade"] -language_ids = { PHP = "php", Blade = "blade" } +languages = ["PHP", "Blade", "Twig", "YAML", "XML"] +language_ids = { PHP = "php", Blade = "blade", Twig = "twig", YAML = "yaml", XML = "xml" } [debug_adapters.Xdebug] From 42b9589b8015ed0f629b271563c83ee791615e74 Mon Sep 17 00:00:00 2001 From: "Giuseppe.Esposito" Date: Sun, 1 Nov 2026 22:19:41 +0100 Subject: [PATCH 2/2] Start PHPantom for Twig, YAML and XML only when enabled Zed's defaults set no language_servers for these languages, so without this every user of the extension would get PHPantom on any YAML, Twig or XML file, in projects without PHP too. Users enable it per language, ideally in the project settings of a PHP project. Zed versions before 1.24 ignore opt_in_languages. Assisted-by: claude-code/claude-opus-5-5 --- extension.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/extension.toml b/extension.toml index 42bcc56..14dda7b 100644 --- a/extension.toml +++ b/extension.toml @@ -25,6 +25,7 @@ language_ids = { PHP = "php", Blade = "blade" } name = "PHPantom" languages = ["PHP", "Blade", "Twig", "YAML", "XML"] language_ids = { PHP = "php", Blade = "blade", Twig = "twig", YAML = "yaml", XML = "xml" } +opt_in_languages = ["Twig", "YAML", "XML"] [debug_adapters.Xdebug]