Eglot

Eglot is the Emacs client for the Language Server Protocol (LSP). The name “Eglot” is an acronym that stands for “Emacs Polyglot”. 1 Eglot provides infrastructure and a set of commands for enriching the source code editing capabilities of Emacs via LSP. LSP is a standardized communications protocol between source code editors (such as Emacs) and language servers—programs external to Emacs which analyze the source code on behalf of Emacs. The protocol allows Emacs to receive various source code services from the server, such as description and location of function calls, types of variables, class definitions, syntactic errors, etc. This way, Emacs doesn’t need to implement the language-specific parsing and analysis capabilities in its own code, but is still capable of providing sophisticated editing features that rely on such capabilities, such as automatic code completion, go-to definition of function/class, documentation of symbol at-point, refactoring, on-the-fly diagnostics, and more.

Eglot itself is completely language-agnostic, but it can support any programming language for which there is a language server and an Emacs major mode.

This manual documents how to configure, use, and customize Eglot.

This manual is for Eglot, the Emacs LSP client.

Copyright © 2022–2024 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being “A GNU Manual”, and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License”.

(a) The FSF’s Back-Cover Text is: “You have the freedom to copy and modify this GNU manual.”

Table of Contents


Footnotes

(1)

A polyglot is a person who is able to use several languages.