GNU ELPA - eglot


The Emacs Client for LSP servers
eglot-1.17.tar (.sig), 2024-Mar-31, 310 KiB
João Távora <>
Atom feed
Browse ELPA's repository
CGit or Gitweb

To install this package from Emacs, use list-packages.

Full description

Eglot ("Emacs Polyglot") is an Emacs LSP client that stays out of
your way.

Typing M-x eglot in some source file is often enough to get you
started, if the language server you're looking to use is installed
in your system.  Please refer to the manual, available from or from M-x info for more usage

If you wish to contribute changes to Eglot, please do read the user
manual first.  Additionally, take the following in consideration:

* Eglot's main job is to hook up the information that language
  servers offer via LSP to Emacs's UI facilities: Xref for
  definition-chasing, Flymake for diagnostics, Eldoc for at-point
  documentation, etc.  Eglot's job is generally *not* to provide
  such a UI itself, though a small number of simple
  counter-examples do exist, e.g. in the `eglot-rename' command or
  the `eglot-inlay-hints-mode' minor mode.  When a new UI is
  evidently needed, consider adding a new package to Emacs, or
  extending an existing one.

* Eglot was designed to function with just the UI facilities found
  in the latest Emacs core, as long as those facilities are also
  available as GNU ELPA :core packages.  Historically, a number of
  :core packages were added or reworked in Emacs to make this
  possible.  This principle should be upheld when adding new LSP
  features or tweaking existing ones.  Design any new facilities in
  a way that they could work in the absence of LSP or using some
  different protocol, then make sure Eglot can link up LSP
  information to it.

* There are few Eglot configuration variables.  This principle
  should also be upheld.  If Eglot had these variables, it could be
  duplicating configuration found elsewhere, bloating itself up,
  and making it generally hard to integrate with the ever growing
  set of LSP features and Emacs packages.  For instance, this is
  why one finds a single variable
  `eglot-ignored-server-capabilities' instead of a number of
  capability-specific flags, or why customizing the display of
  LSP-provided documentation is done via ElDoc's variables, not

* Linking up LSP information to other libraries is generally done
  in the `eglot--managed-mode' minor mode function, by
  buffer-locally setting the other library's variables to
  Eglot-specific versions.  When deciding what to set the variable
  to, the general idea is to choose a good default for beginners
  that doesn't clash with Emacs's defaults.  The settings are only
  in place during Eglot's LSP-enriched tenure over a project.  Even
  so, some of those decisions will invariably aggravate a minority
  of Emacs power users, but these users can use `eglot-stay-out-of'
  and `eglot-managed-mode-hook' to adjust things to their

* On occasion, to enable new features, Eglot can have soft
  dependencies on popular libraries that are not in Emacs core.
  "Soft" means that the dependency doesn't impair any other use of
  Eglot beyond that feature.  Such is the case of the snippet
  functionality, via the Yasnippet package, Markdown formatting of
  at-point documentation via the markdown-mode package, and nicer
  looking completions when the Company package is used.

Old versions

eglot-1.16.tar.lz2023-Dec-2771.7 KiB
eglot-1.16.tar.lz2023-Dec-2771.7 KiB
eglot-1.15.tar.lz2023-Apr-3066.8 KiB
eglot-1.15.tar.lz2023-Apr-3066.8 KiB
eglot-1.14.tar.lz2023-Apr-0365.6 KiB
eglot-1.9.tar.lz2022-Oct-1162.3 KiB
eglot-1.8.tar.lz2022-Jan-1251.1 KiB
eglot-1.7.tar.lz2020-Dec-18 265 KiB
eglot-1.6.tar.lz2020-Apr-16 290 KiB
eglot-1.1.tar.lz2018-Jul-10 242 KiB
eglot-1.0.tar.lz2018-Jun-22 247 KiB
eglot-0.10.tar.lz2018-Jun-13 237 KiB
eglot-0.9.tar.lz2018-Jun-10 237 KiB
eglot-0.8.tar.lz2018-Jun-01 236 KiB
eglot-0.7.tar.lz2018-May-3045.7 KiB
eglot-0.6.tar.lz2018-May-2745.1 KiB
eglot-0.5.tar.lz2018-May-2644.6 KiB
eglot-0.4.tar.lz2018-May-2140.5 KiB
eglot-0.3.tar.lz2018-May-1738.9 KiB
eglot-0.2.tar.lz2018-May-1538.3 KiB


Eglot NEWS                                                     -*- outline -*-

Copyright (C) 2018-2024 Free Software Foundation, Inc.
See the end of the file for license conditions.

Please send Eglot bug reports to '', and Cc (or
X-Debbugs-CC) the maintainer '' as well.  Please
read the chapter titled "Troubleshooting" in the Eglot manual,

This file is about changes in Eglot, the Emacs client for LSP
(Language Server Protocol) distributed with GNU Emacs since Emacs
version 29.1 and with GNU ELPA since 2018.

Note: references to some Eglot issues are presented as "github#nnnn".
This refers to  That is,
to look up issue github#1234, go to

* Changes in upcoming Eglot

* Changes in Eglot 1.17 (25/1/2024)

** Fixes to completion (github#847, github#1349)

** Fix code-action gathering for some servers (github#847)

** Experimental support for Eglot-only subprojects

Until project.el's support for subprojects improves, github#1337
describes a reasonably sane way to configure nested sub-projects
within a larger one just for Eglot purposes.

* Changes in Eglot 1.16 (27/12/2023)

** Code actions can be previewed in diff format

The variable 'eglot-confirm-server-edits' replaces the obsolete
'eglot-confirm-server-initiated-edits' and brings about a new
confirmation model for code actions, making it possible to have only
certain commands require user confirmation.  It allows a temporary
'diff-mode' buffer to display the proposed changes, so the user can
apply them one by one.  See bug#60338.

** Completion sorting has been fixed

In some situations, Eglot was not respecting the completion sort order
decided by the language server, falling back on the sort order
determined by the 'flex' completion style instead.  See github#1306.

** Improve mouse invocation of code actions

When invoking code actions by middle clicking with the mouse on
Flymake diagnostics, it was often the case that Eglot didn't request
code actions correctly and thus no actions were offered to the user.
This has been fixed.  See github#1295.

** Optimized file-watching capability

Some servers, like the Pyright language server, issue too many file
watching requests.  This change slightly reduces the number of file
watcher objects requested from the operating system, which can be a
problem, particularly on Mac OS.  See github#1228 and github#1226.

** Faster, more accurate, event logging

The Eglot events buffer takes advantage of new functionality in
Jsonrpc 1.23.  By default, Lisp-style printing of JSON-RPC message (a
common cause of performance degradation) is disabled.  The full
original JSON message is presented instead.  See new variable
'eglot-events-buffer-config', which replaces the obsolete

** 'textdocument/onTypeFormatting' feature has been fixed

For 'newline' commands, Eglot sometimes sent the wrong character code
to the server.  Also this feature is now less chatty in the mode-line
and messages buffer.

** Partial fix C-M-i "middle-of-symbol" completions (github#1339)

** Add "Extending Eglot" section to manual

** Fixed Elisp interface 'eglot-lsp-context' (github#1336, github#1337)

** Supports LSP's 'window/showRequest' (bug#62116)

** The self-upgrade command is now called 'eglot-upgrade-eglot'

** Newly added directories also watched (github#1228)

** Send correct ':language-id' for JavaScript server (bug#67150)

** New servers have been added to 'eglot-server-programs'.

- nls (bug#63603)
- nixd (bug#64214)
- lexical (bug#65359)
- terraform-ls (bug#65671)
- ruff-lsp (bug#67441)
- uiua (bug#67850)

* Changes in Eglot 1.15 (29/4/2023)

** Fix LSP "languageId" detection

Many servers today support multiple languages, meaning they can handle
more than one file type in the same connection.  This relies on the
client supplying a ':languageId' string.  Previously, Eglot calculated