Setting Up Emacs for PHP Development: LSP, Tree-sitter, and Xdebug
Emacs is a serious PHP development environment once you wire the right packages together.
Emacs is a serious PHP development environment once you wire the right packages together.
Emacs, a versatile and powerful text editor, offers numerous features to
enhance productivity. By customizing your Emacs configuration, you can
streamline your workflow and boost efficiency. In this article, we will
explore various tips and tricks for configuring Emacs to increase
productivity and efficiency.
Modern software projects are getting bigger. Monorepos, microservice architectures, vendor dependencies, and generated code can easily push projects into tens of thousands of files. Without the right workflow, even powerful editors like Emacs can become slow or overwhelming.
Keeping your Emacs packages up to date is essential if you want the latest features, performance improvements, and security fixes. But manual updates can quickly become a chore — especially if you use Emacs as your main development environment and rely on dozens of packages.
For years, Emacs has relied on traditional techniques like regular expressions to provide syntax highlighting, indentation, and code navigation. While powerful and flexible, these approaches struggle to keep up with the complexity of modern programming languages.
For decades, Emacs has relied on the X11 windowing system on Linux. As the Linux desktop ecosystem transitions towards Wayland, Emacs—like many long-lived applications—faces the challenge of adapting to a new display protocol while preserving its flexibility and deep configurability.
Large language models are increasingly useful for developers and writers who spend much of their time inside Emacs. Instead of switching between a browser or external app, you can bring AI assistance directly into your workflow.
When I want to test and learn a single package in Emacs it suits my best to create a simple empty emacs configuration directory in my src folder.
mkdir test-emacs-config
Then put in a very minimal .emacs file testing the package in question. The following sample tests the Vertico package.
If you've ever wished buffer-switching in Emacs felt a bit more like what you find in modern editors like VS Code or Sublime Text, the centaur-tabs package might just be the upgrade you're looking for. While Emacs excels at managing multiple open buffers, the experience can sometimes feel abstract—especially for users coming from tab-oriented editors.
The Emacs editor is often a point of contention in discussions among software developers—especially those raised on the traditional Unix philosophy of building software: “do one thing and do it well.” For many, Emacs is either a miraculous, all-in-one productivity environment or a monolithic anomaly that breaks all the rules Unix tried to teach us.