mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-18 16:08:55 +00:00
languages/php.toml gains a phoxite entry (phoxite-lsp over stdio), a fallback listed after phpactor; Intelephense stays the default and users pick Phoxite under Language Servers. ide-tools installs it from the samehelhawary/phoxite GitHub releases (a binary per platform with a .sha256 beside it). A server entry can now name the servers it replaces: those stay away while it serves the file (Phoxite replaces laravel-lsp, which it covers), including when the replacing fallback takes over after a server gives up. Co-authored-by: samehelhawary <8745956+samehelhawary@users.noreply.github.com>
55 lines
1.8 KiB
TOML
55 lines
1.8 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 = "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 (https://phpactor.readthedocs.io/en/master/usage/standalone.html)"
|
||
|
||
# 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-lsp from https://github.com/samehelhawary/phoxite/releases and put it on PATH"
|
||
|
||
# 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"
|