PHP(recommended)#
Server#
For more information about the LSP server, check intelephense.
Installation#
Automatic or manual by
npm i intelephense -g``
Debugger: Yes#
Available configurations#
lsp-clients-php-server-command
#
Type: (repeat string)
Default: nil
Install directory for php-language-server.
lsp-php-composer-dir
#
Type: string
Default: nil
Home directory of composer.
lsp-intelephense-clear-cache
#
Type: boolean
Default: nil
Optional flag to clear server state.
lsp-intelephense-completion-fully-qualify-global-constants-and-functions
#
Type: boolean
Default: nil
Global namespace constants and functions will be fully qualified (prefixed with a backslash).
lsp-intelephense-completion-insert-use-declaration
#
Type: boolean
Default: t
Use declarations will be automatically inserted for namespaced classes, traits, interfaces, functions, and constants.
lsp-intelephense-completion-max-items
#
Type: number
Default: 100
The maximum number of completion items returned per request.
lsp-intelephense-completion-trigger-parameter-hints
#
Type: boolean
Default: t
Method and function completions will include parentheses and trigger parameter hints.
lsp-intelephense-files-associations
#
Type: (repeat string)
Default: [*.php *.phtml]
Configure glob patterns to make files available for language server features.
lsp-intelephense-files-exclude
#
Type: (repeat string)
Default: [**/.git/** **/.svn/** **/.hg/** **/CVS/** **/.DS_Store/** **/node_modules/** **/bower_components/** **/vendor/**/{Test,test,Tests,tests}/**]
Configure glob patterns to exclude certain files and folders from all language server features.
lsp-intelephense-files-max-size
#
Type: number
Default: 1000000
Maximum file size in bytes.
lsp-intelephense-format-braces
#
Type: string
Default: psr12
Formatting braces style. psr12, allman or k&r
lsp-intelephense-format-enable
#
Type: boolean
Default: t
Enables formatting.
lsp-intelephense-global-storage-path
#
Type: directory
Default: ~/.emacs.d/intelephense
Optional absolute path to global storage dir.
lsp-intelephense-licence-key
#
Type: string
Default: nil
Enter your intelephense licence key here to access premium features.
lsp-intelephense-multi-root
#
Type: boolean
Default: t
Flag to control if the server supports multi-root projects.
lsp-intelephense-paths-include
#
Type: lsp-string-vector
Default: []
Configure additional paths outside workspace.
lsp-intelephense-php-version
#
Type: string
Default: 9.0.0
Minimum version of PHP to refer to. Affects code actions, diagnostic & completions.
lsp-intelephense-rename-exclude
#
Type: (repeat string)
Default: [**/vendor/**]
Glob patterns to exclude files and folders from having symbols renamed. Rename operation will fail if references and/or definitions are found in excluded files/folders.
lsp-intelephense-server-command
#
Type: (repeat string)
Default: (intelephense --stdio)
Command to start Intelephense.
lsp-intelephense-storage-path
#
Type: directory
Default: ~/.emacs.d/lsp-cache
Optional absolute path to storage dir.
lsp-intelephense-stubs
#
Type: (repeat string)
Default: [apache bcmath bz2 calendar com_dotnet Core ctype curl date dba dom enchant exif fileinfo filter fpm ftp gd hash iconv imap interbase intl json ldap libxml mbstring mcrypt meta mssql mysqli oci8 odbc openssl pcntl pcre PDO pdo_ibm pdo_mysql pdo_pgsql pdo_sqlite pgsql Phar posix pspell readline recode Reflection regex session shmop SimpleXML snmp soap sockets sodium SPL sqlite3 standard superglobals sybase sysvmsg sysvsem sysvshm tidy tokenizer wddx xml xmlreader xmlrpc xmlwriter Zend OPcache zip zlib]
Configure stub files for built in symbols and common extensions. The default setting includes PHP core and all bundled extensions.
lsp-intelephense-telemetry-enabled
#
Type: boolean
Default: nil
Anonymous usage and crash data will be sent to Azure Application Insights.
lsp-intelephense-trace-server
#
Type: (choice (:tag off messages verbose))
Default: off
Traces the communication between VSCode and the intelephense language server.