дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-03 16:51:16 +02:00
Blade and Twig templates get their own languages with highlighting, and framework files that are PHP under other names are associated with PHP. The Blade highlighter's preceding-character check runs on WebKit, and language-server sharing between languages follows direct definitions only, preventing cycles and letting a shadowed server detach. Co-authored-by: samehelhawary <[email protected]>
78 рядки
2.7 KiB
TOML
78 рядки
2.7 KiB
TOML
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", "index.php"]
|
||
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"]
|
||
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"
|