Skip to content
Marc Deop edited this page Oct 5, 2017 · 10 revisions

A pure PHP implementation of the open Language Server Protocol. Provides static code analysis for PHP for any IDE.

Uses the great Tolerant PHP Parser, phpDocumentor's DocBlock reflection and an event loop for concurrency.

Installing server with Plug in .vimrc

Plug 'felixfbecker/php-language-server', {'do': 'composer install && composer run-script parse-stubs'}

Registering in .vimrc

au User lsp_setup call lsp#register_server({                                    
     \ 'name': 'php-language-server',                                            
     \ 'cmd': {server_info->['php', expand('~/.vim/plugged/php-language-server/bin/php-language-server.php')]},
     \ 'whitelist': ['php'],                                                     
     \ })