← Retour au blog
tech 12 May 2026

Transitioning from lsp-mode to Eglot in GNU Emacs

Discover the transition from lsp-mode to Eglot in GNU Emacs with practical examples and tips to optimize your workflow.

Article inspired by the original source
Moving from lsp-mode in GNU Emacs to Eglot ↗ utcc.utoronto.ca

Introduction

If you're a GNU Emacs user, you likely know how integrating Language Server Protocols (LSP) has transformed the development experience. Two of the most popular tools to implement LSP in Emacs are lsp-mode and Eglot. While both offer similar features, Eglot has gained traction in recent years for its simplicity and lightweight nature.

Why Switch from lsp-mode to Eglot?

One of the main reasons many developers choose to switch from lsp-mode to Eglot is the ease of configuration. Eglot does not require complex setup to get started. While lsp-mode offers deep customization, it can become complex and cumbersome to manage for simple projects.

Simplicity and Lightweight

Eglot is designed to be "plug and play." This means that from the moment you install it, it works with little to no configuration. This simplicity is ideal for developers who want to focus on coding rather than configuring their development environment.

Improved Performance

While lsp-mode offers many powerful features, they often come at a performance cost. Eglot, on the other hand, is more lightweight, which can translate to a more responsive experience, especially on less powerful machines.

How to Migrate to Eglot

Installing Eglot

To install Eglot, you can use package.el, Emacs' built-in package manager. Here's how:

``elisp M-x package-install RET eglot RET ``

Basic Configuration

Once installed, the basic configuration is very straightforward. Simply add the following to your .emacs or init.el file:

``elisp (add-hook 'prog-mode-hook 'eglot-ensure) ``

This line ensures that Eglot is enabled for all programming modes. You can adjust it to activate only for specific modes.

Using LSP Servers

With Eglot, everything is seamlessly integrated. To start an LSP server, simply open a supported file and Eglot will automatically launch the appropriate server.

Feature Comparison

While lsp-mode offers more features and customizations, Eglot focuses on the essentials. Here are some key comparisons:

  • Debugging: lsp-mode has better integration with debugging tools.
  • Customization: lsp-mode allows for more in-depth customization, albeit with increased complexity.
  • Simplicity: Eglot wins here with minimal configuration.

Use Cases and Testimonials

Many developers have shared their experiences transitioning to Eglot. For instance, a developer working on a Python project noted a significant reduction in response time in Emacs after switching to Eglot.

Another developer working on JavaScript projects appreciated the simplicity of the setup, allowing her to focus more on development rather than maintaining the environment.

Conclusion

Switching from lsp-mode to Eglot can simplify your workflow, especially if you're looking to reduce the complexity of your development environment. With its simplicity and lightweight performance, Eglot is a great choice for many Emacs developers.

Let's discuss your project in 15 minutes.

Emacs Eglot lsp-mode LSP transition
Deepthix newsletter · 100% AI · every Monday 8am

An AI agent reads tech for you.

Our AI agent scans ~200 sources per week and ships the best articles to your inbox Monday 8am. Free. One click to unsubscribe.

Visit the newsletter page →

Want to automate your operations?

Let's talk about your project in 15 minutes.

Book a call