Repolode
joaotavora

joaotavora/eglot

Eglot is an LSP client built into Emacs that connects editing buffers to language servers with minimal configuration.

Stars
2,570
Forks
210
Open issues
55
Last commit
8 days ago

What is it?

Eglot (Emacs Polyglot) is a Language Server Protocol client for Emacs. Running M-x eglot in a source file starts a suitable language server for that file's major mode, guessing the program when possible and prompting otherwise. It then syncs open files within the project and relays server features into Emacs's own tooling.

Eglot uses built-in Emacs facilities rather than separate frameworks: Flymake shows diagnostics, ElDoc shows hover information and signatures, and Xref handles go-to-definition and find-references. Completion works through completion-at-point, and yasnippet-based snippet completion is supported when enabled before connecting. Code actions, rename and server-initiated edits (confirmed with the user by default) are also available.

Eglot is now part of Emacs core since Emacs 29, and this repository mirrors that upstream code for use on older Emacs versions through GNU ELPA. Development happens in the Emacs project, and patches are submitted by email.

Key features

  • 01Starts language servers with M-x eglot and guesses the server program when possible.
  • 02Shows diagnostics through Flymake and hover docs through ElDoc.
  • 03Provides completion via completion-at-point, with optional yasnippet snippets.
  • 04Supports rename, code actions, and xref-based definition and reference lookup.
  • 05Ships with a long list of preconfigured servers, such as clangd, gopls, rust-analyzer and pyright.

Use cases

  • Writing C, C++, Go or Rust code in Emacs with full language-server features.
  • Working in Python or TypeScript projects with diagnostics and completion inside Emacs.
  • Trying LSP support in Emacs without installing a heavier framework.

Quick start

  1. 1

    Install the stable version from GNU ELPA inside Emacs

    M-x package-install RET eglot RET
  2. 2

    Open any source file and start Eglot

    M-x eglot

Things to know

  • It runs only inside Emacs, so it is not usable from other editors.
  • This repository is no longer the development upstream, and pull requests will not be merged.
  • Licensed under GPL-3.0, a copyleft license.

Topics

FAQ

What is eglot?
Eglot is an LSP client built into Emacs that connects editing buffers to language servers with minimal configuration. Eglot (Emacs Polyglot) is a Language Server Protocol client for Emacs. Running M-x eglot in a source file starts a suitable language server for that file's major mode, guessing the program when possible and prompting otherwise. It then syncs open files within the project and relays server features into Emacs's own tooling.
Is eglot free to use? What license does it have?
eglot is open source under the GPL-3.0 license. Check the license terms before using it in commercial products.
Is eglot still maintained?
Actively maintained. The last commit to eglot was on Oct 30, 2026.
What can I use eglot for?
Writing C, C++, Go or Rust code in Emacs with full language-server features. Working in Python or TypeScript projects with diagnostics and completion inside Emacs. Trying LSP support in Emacs without installing a heavier framework.
How do I install eglot?
Install the stable version from GNU ELPA inside Emacs: M-x package-install RET eglot RET Open any source file and start Eglot: M-x eglot
Where can I get eglot?
The source code and installation instructions are on GitHub: https://github.com/joaotavora/eglot

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects