Файли
openidea/languages/php.toml
T
Anders JenboтаAJenbo d4a2a84c36 fix(php): give PHPantom the template, configuration and settings support it has (#7827)
PHPantom has its own Blade, Twig and framework support, but Twig, YAML and XML files were never sent to it, laravel-lsp kept running alongside it, and it was never told the project is trusted. PHPantom now joins twig, yaml and xml (XML limited to *.xml, *.xlf, *.xliff), replaces laravel-lsp, gets .phpantom.toml as a root marker, and configure_phpantom sends workspaceTrusted (servers only start outside Restricted Mode) plus the excluded folders and PHP file-type extensions as its indexing filters at startup and on every configuration change. Docs updated.

Co-authored-by: AJenbo <[email protected]>
2026-12-03 23:06:52 +08:00

83 рядки
3.0 KiB
TOML
Неформатований Анотація Історія

Цей файл містить неоднозначні символи Юнікоду
Цей файл містить символи Юнікоду, які можна сплутати з іншими символами. Якщо ви вважаєте, що це зроблено навмисно, можете сміливо ігнорувати це попередження. Щоб показати їх, скористайтеся кнопкою Escape.
id = "php"
name = "PHP"
extensions = ["php", "phtml", "php3", "php4", "php5", "phps", "phpt"]
first-line = "^(<\\?php|#!.*\\bphp\\b)"
line-comment = "//"
block-comment = ["/*", "*/"]
indent = { tab-size = 4, insert-spaces = true }
ui-mode = "PHP"
tree-sitter = "php"
[[language-servers]]
name = "intelephense"
command = "intelephense"
args = ["--stdio"]
root-markers = ["composer.json", ".phpactor.json", "index.php"]
install-hint = "npm i -g intelephense"
# Intelephense applies the PHP version only to documents it parses after reading it.
resync-on-configuration = true
[[language-servers]]
name = "phpantom"
# PHPantom 1.1.0 can cancel these operations without ending server-created progress.
ignored-progress-token-prefixes = ["find_references", "goto_implementation"]
fallback = true
command = "phpantom_lsp"
args = []
root-markers = ["composer.json", ".phpantom.toml", "index.php"]
# It answers the Laravel strings itself.
replaces = ["laravel-lsp"]
install-hint = "Install PHPantom in Settings › Languages & Frameworks › Language Servers"
[[language-servers]]
name = "phpactor"
# Alternative: used only when the server above is not installed.
fallback = true
command = "phpactor"
args = ["language-server"]
root-markers = ["composer.json", ".phpactor.json"]
install-hint = "Install Phpactor in Settings › Languages & Frameworks › Language Servers (it runs on PHP)"
# Alternative with its own Laravel and Blade support. https://github.com/samehelhawary/phoxite
[[language-servers]]
name = "phoxite"
fallback = true
command = "phoxite-lsp"
args = []
root-markers = ["composer.json", "artisan", "index.php"]
# It answers the Laravel strings itself.
replaces = ["laravel-lsp"]
# It asks for the files of the frameworks it finds: a WordPress project's scripts, a
# Drupal module's YAML, a Magento module's XML, a Joomla extension's manifests.
dynamic-documents = true
install-hint = "Install Phoxite in Settings › Languages & Frameworks › Language Servers"
# Alternative whose engine ships as native builds for Windows, macOS and Linux;
# only the npm launcher needs Node. Some features (refactorings, call and type
# hierarchy) need a DEVSENSE licence. https://docs.devsense.com/other/lsp/docs/
[[language-servers]]
name = "devsense-php-ls"
fallback = true
command = "devsense-php-ls"
args = []
root-markers = ["composer.json", "index.php"]
# It answers the Laravel strings itself.
replaces = ["laravel-lsp"]
install-hint = "npm i -g devsense-php-ls"
# Laravel projects only: hover, definition and completion inside
# config('…'), route('…') and view('…'). Last: Intelephense keeps PHP hover,
# rename and symbols. https://github.com/laravel/lsp
[[language-servers]]
name = "laravel-lsp"
command = "laravel-lsp"
args = []
root-markers = ["artisan"]
require-root-marker = true
install-hint = "composer global require laravel/lsp"
[debugger]
adapter = "php-debug"
command = "php-debug-adapter"
install-hint = "Install PHP Debug (Xdebug) in Settings › Languages & Frameworks › Language Servers, and enable Xdebug"