|Project Name||Stars||Downloads||Repos Using This||Packages Using This||Most Recent Commit||Total Releases||Latest Release||Open Issues||License||Language|
|Language Server Protocol||9,969||21 hours ago||242||cc-by-4.0||HTML|
|Defines a common protocol for language servers.|
|Nvim Lspconfig||8,144||16 hours ago||56||apache-2.0||Lua|
|Quickstart configs for Nvim LSP|
|Eglot||1,991||2 months ago||75||gpl-3.0||Emacs Lisp|
|A client for Language Server Protocol servers|
|Vscode Java||1,932||3 days ago||841||epl-2.0||TypeScript|
|Java Language Support for Visual Studio Code|
|Kotlin Language Server||1,307||6 days ago||1||March 10, 2021||172||mit||Kotlin|
|Kotlin code completion, linting and more for any editor/IDE using the Language Server Protocol|
|Texlab||1,182||2 days ago||9||October 23, 2022||28||gpl-3.0||Rust|
|An implementation of the Language Server Protocol for LaTeX|
|Vim Lsp Settings||1,146||15 days ago||78||mit||Vim Script|
|Auto configurations for Language Server for vim-lsp|
|Go Langserver||1,113||9||17||2 years ago||7||August 24, 2021||60||mit||Go|
|Go language server to add Go support to editors and other tools that use the Language Server Protocol (LSP)|
|Language Tools||1,082||3,643||7 days ago||231||September 19, 2023||238||mit||TypeScript|
|The Svelte Language Server, and official extensions which use it|
|Php Language Server||1,061||26||1||2 years ago||64||November 13, 2018||267||isc||PHP|
|PHP Implementation of the VS Code Language Server Protocol 🆚↔🖥|
A pure PHP implementation of the open Language Server Protocol. Provides static code analysis for PHP for any IDE.
Table of Contents
A hover request returns a declaration line (marked with language
php) and the summary of the docblock.
For Parameters, it will return the
The query is matched case-insensitively against the fully qualified name of the symbol.
Non-Standard: An empty query will return all symbols found in the workspace.
PHP parse errors are reported as errors, parse errors of docblocks are reported as warnings.
Errors/Warnings from the
vendor directory are ignored.
Completion, type resolval etc. will use the standard PHP library and common extensions.
Globally searchable definitions are:
Definitions resolved just-in-time when needed:
Not supported yet:
Namespaces are not considerd a declaration by design because they only make up a part of the fully qualified name and don't map to one unique declaration.
Definitions/references/hover currently work for
usestatements for classes, constants and functions
This language server implements the files protocol extension.
If the client expresses support through
the server will request files in the workspace and file contents through requests from the client and never access
the file system directly. This allows the server to operate in an isolated environment like a container,
on a remote workspace or any a different protocol than
Upon initialization, the server will recursively scan the project directory for PHP files, parse them and add all definitions and references to an in-memory index. The time this takes depends on the project size. At the time of writing, this project contains 78 files + 1560 files in dependencies which take 97s to parse and consume 76 MB on a Surface Pro 3. The language server is fully operational while indexing and can respond to requests with the definitions already indexed. Follow-up requests will be almost instant because the index is kept in memory.
Having XDebug enabled heavily impacts performance and can even crash the server if the
max_nesting_level setting is too low.
This project follows semver for the protocol communication and command line parameters, e.g. a major version increase of the LSP will result in a major version increase of the PHP LS. New features like request implementations will result in a new minor version. Everything else will be a patch release. All classes are considered internal and are not subject to semver.
The recommended installation method is through Composer. Simply run
composer require felixfbecker/language-server
and you will get the latest stable release and all dependencies.
composer update will update the server to the latest non-breaking version.
After installing the language server and its dependencies, you must parse the stubs for standard PHP symbols and save the index for fast initialization.
composer run-script --working-dir=vendor/felixfbecker/language-server parse-stubs
Start the language server with
Causes the server to use a tcp connection for communicating with the language client instead of using STDIN/STDOUT. The server will try to connect to the specified address. Strongly recommended on Windows because of blocking STDIO.
php bin/php-language-server.php --tcp=127.0.0.1:12345
Causes the server to use a tcp connection for communicating with the language client instead of using STDIN/STDOUT. The server will listen on the given address for a connection. If PCNTL is available, will fork a child process for every connection. If not, will only accept one connection and the connection cannot be reestablished once closed, spawn a new process instead.
php bin/php-language-server.php --tcp-server=127.0.0.1:12345
Sets memory limit for language server. Equivalent to memory-limit php.ini directive. The default is 4GB (which is way more than needed).
php bin/php-language-server.php --memory-limit=256M
You need at least PHP 7.0 and Composer installed. Clone the repository and run
to install dependencies.
Run the tests with
The project parses PHPStorm's PHP stubs to get support for PHP builtins. It re-parses them as needed after Composer processes, but after some code changes (such as ones involving the index or parsing) you may have to explicitly re-parse them:
composer run-script parse-stubs
To debug with xDebug ensure that you have this set as an environment variable
This tells the Language Server to not restart without XDebug if it detects that XDebug is enabled (XDebug has a high performance impact).