Hasty Briefsbeta

Bilingual

Escape IntelliJ: Scala and Kotlin LSPs on Emacs Eglot

2 days ago
  • Emacs 29 made Eglot the built-in LSP client; it's lightweight but minimal, requiring Elisp for workarounds.
  • Author shares production-ready Eglot config for Scala, Kotlin, and Java, with hooks and keybindings.
  • Customizations include JVM tuning for Metals, inlay hints, YAML schema mapping, and fixing Kotlin LSP bugs (empty newText, jar URI translation).
  • Intercepts JSON-RPC via advice-add to patch server behavior, e.g., removing empty textEdit, disabling Metals semantic refresh.
  • Uses Nix flakes and direnv for reproducible development environments per project.
  • Concludes that Eglot's minimalism is empowerable via Emacs Lisp hacking.