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

I like Sublime Text. I really do. I like how fast it is, how versatile it is, and overall I have a very good experience with it.

Despite how popular VS Code has become recently, I find it just a little slow to my liking. Then there is also PHPStorm which is feature-packed, but a little heavy to my liking.

So what if we can add some IDE features to an ultra-fast editor? That would be great isn’t it? Well that’s totally possible!

  1. Go to your Terminal app and install intelephense by running: npm -g i intelephense .
{
"enabled": true,
"command": [
"intelephense",
"--stdio",
],
"scopes": ["source.php", "embedding.php"],
"syntaxes": ["Packages/PHP/PHP.sublime-syntax"],
"languageId": "php",
"initializationOptions": {
"clearCache": false,
"licenceKey": "",
},
}

Now restart your Sublime Text and you are all done! You should now be able to autocomplete accurately.

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

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