Next: More Customization, Previous: Customization Variables, Up: Customizing Eglot [Contents][Index]
This section provides a reference for Eglot variables that are meant to be changed from Elisp snippets.
eglot-server-programsThis variable determines which language server to start for each supported major mode, and how to invoke that server’s program. See Setting Up LSP Servers, for the details.
eglot-strict-mode ¶ This is nil by default, meaning that Eglot is generally lenient
about non-conforming servers. If you need to debug a server, set this
to (disallow-non-standard-keys enforce-required-keys).
eglot-server-initialized-hook ¶ A hook run after the server object is successfully initialized (which
includes launching the process) but before any LSP communication is
attempted. Each function receives a eglot-lsp-server instance as
argument.
eglot-connect-hook ¶ A hook run after the LSP connection to the server is successfully
established. Each function receives a eglot-lsp-server instance
as argument. See Starting Eglot.
eglot-managed-mode-hookA hook run after Eglot started or stopped managing a buffer. See Buffers, Projects, and Eglot, for details of its usage.
eglot-stay-out-of ¶ This variable’s value lists Emacs features that Eglot shouldn’t
automatically try to manage on the user’s behalf. It is useful, for
example, when you need to use non-LSP Flymake or Company back-ends. To
have Eglot stay away from some Emacs feature, add that feature’s symbol
or a regexp that will match a symbol’s name to the list: for example,
the symbol xref to leave Xref alone, or the string ‘company’
to stay away from your Company customizations. Here’s an example:
(add-to-list 'eglot-stay-out-of 'flymake)
Note that you can still configure the excluded Emacs features manually
to use Eglot in your eglot-managed-mode-hook or via some other
mechanism.
Next: More Customization, Previous: Customization Variables, Up: Customizing Eglot [Contents][Index]