Skip to content

PHP language server

Darlan de Campos edited this page Apr 21, 2020 · 2 revisions

PHP Language Server

This is a guide on how to integrate a php language server with LanguageClient-neovim.

Requirements

  • nvim/vim
  • nodejs and npm

Installation

Install language server, we use intelephense as the language server.

npm i intelephense -g

Client configuration

Next we add it to the server commands/

let g:LanguageClient_serverCommands = {  " other server commands... \ 'php': ['intelephense', '--stdio'], \ }

Server configuration

In order for the server to work properly, you may need to have this configuration in your settings.json file:

{ "initializationOptions": { "storagePath": "/tmp/intelephense" } }

The storagePath value will need adjustments according to your OS.

References

Clone this wiki locally