Turn Sublime Text into An Awesome IDE for Laravel / PHP with LSP and Intelephense

  1. Go to your Terminal app and install intelephense by running: npm -g i intelephense .
  2. Open the command palette in Sublime Text and run Package Control: Install Package, then select LSP and LSP-intelephense to install both packages.
  3. Enable the server by running LSP: Enable Language Server in command palette. Then choose lsp-intelephense from the menu.
  4. Go to LSP > Servers > LSP-intelephense under Package Settings, copy and paste the following json into your settings file to setup LSP and Intelephense:
{
"enabled": true,
"command": [
"intelephense",
"--stdio",
],
"scopes": ["source.php", "embedding.php"],
"syntaxes": ["Packages/PHP/PHP.sublime-syntax"],
"languageId": "php",
"initializationOptions": {
"clearCache": false,
"licenceKey": "",
},
}
Auto-completing for a model called Node in Laravel.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jian Jye

Jian Jye

I write about Laravel, PHP, and web development related articles.