← Retour au blog
tech 23 July 2026

Escape IntelliJ: Using Scala and Kotlin with Emacs Eglot

Discover how Emacs Eglot can revolutionize your Scala and Kotlin development by replacing IntelliJ. Enjoy unparalleled lightness and flexibility.

Article inspired by the original source
Escape IntelliJ: Scala and Kotlin LSPs on Emacs Eglot ↗ jointhefreeworld.org

Introduction

For many developers working with Scala and Kotlin, IntelliJ IDEA has long been the default choice. However, with the integration of Eglot in Emacs 29 as the default LSP client, a lightweight and flexible alternative is available. Eglot, with its Unix philosophy, offers a modular and hackable approach to JVM development without the massive memory footprint of IntelliJ.

Why Escape IntelliJ?

IntelliJ, while extremely powerful, is also notoriously resource-intensive. According to some estimates, it can consume over 8GB of RAM when indexing projects, slowing down your system. In comparison, Emacs with Eglot offers a much lighter solution.

The Advantages of Emacs and Eglot

  1. Unix Philosophy of LSPs: Eglot acts as a lightweight, protocol-first transport, communicating with dedicated language servers via JSON-RPC.
  2. Infinite Hackability: With Emacs, you can intercept vulnerabilities live through Lisp, a flexibility that IntelliJ cannot offer.
  3. Unified Interface: The same text manipulation and completion tools are usable whether you are editing Scala, Markdown, or a Nix file.

Basic Configuration

Installation and Setup

Start by installing Emacs and configuring Eglot. Use package managers like Elpaca and use-package to optimize your configuration. Here's a basic Eglot configuration for Scala and Kotlin:

``lisp (use-package eglot :config (add-to-list 'eglot-server-programs '(scala-mode . ("metals-emacs"))) (add-to-list 'eglot-server-programs '(kotlin-mode . ("kotlin-language-server")))) ``

Advanced Configuration

For more complex projects, you'll need specific configurations. For Scala, the Metals server is recommended. For Kotlin, the Kotlin Language Server is often used.

#### Scala with Metals

Metals offers powerful integration for Scala, including features like intelligent refactoring and code diagnostics.

#### Kotlin with Kotlin Language Server

This server provides code completion, navigation, and diagnostics for Kotlin, tightly integrating these features with Emacs.

Tips and Tricks

Performance Optimization

While Emacs is lightweight, optimization is essential for large-scale projects. Configure your LSP servers to make the most of your hardware.

Debugging and Extensions

Take advantage of Emacs' extensibility with Lisp to customize your environment. Create scripts to automate repetitive tasks and enhance your workflow.

Conclusion

Adopting Emacs with Eglot for Scala and Kotlin development not only lightens your system's load but also offers unparalleled flexibility. Why not give it a try?

Let's discuss your project in 15 minutes.

Emacs Eglot Scala Kotlin IntelliJ
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