To install this package, run in Emacs:
M-x package-install RET eglot RET
Simply M-x eglot should be enough to get you started, but here's a little info (see the accompanying README.md or the URL for more). M-x eglot starts a server via a shell-command guessed from `eglot-server-programs', using the current major-mode (for whatever language you're programming in) as a hint. If it can't guess, it prompts you in the mini-buffer for these things. Actually, the server needen't be locally started: you can connect to a running server via TCP by entering a <host:port> syntax. Anyway, if the connection is successful, you should see an `eglot' indicator pop up in your mode-line. More importantly, this means current *and future* file buffers of that major mode *inside your current project* automatically become \"managed\" by the LSP server, i.e. information about their contents is exchanged periodically to provide enhanced code analysis via `xref-find-definitions', `flymake-mode', `eldoc-mode', `completion-at-point', among others. To "unmanage" these buffers, shutdown the server with M-x eglot-shutdown. You can also do: (add-hook 'foo-mode-hook 'eglot-ensure) To attempt to start an eglot session automatically every time a foo-mode buffer is visited.
eglot-1.7.tar.lz | 2020-Dec-18 | 265 KiB |
eglot-1.6.tar.lz | 2020-Apr-16 | 290 KiB |
eglot-1.5.tar.lz | 2019-Oct-20 | 287 KiB |
eglot-1.4.tar.lz | 2019-Jan-05 | 282 KiB |
eglot-1.3.tar.lz | 2018-Dec-10 | 280 KiB |
eglot-1.2.tar.lz | 2018-Nov-23 | 276 KiB |
eglot-1.1.tar.lz | 2018-Jul-10 | 242 KiB |
eglot-1.0.tar.lz | 2018-Jun-22 | 247 KiB |
eglot-0.10.tar.lz | 2018-Jun-13 | 237 KiB |
eglot-0.9.tar.lz | 2018-Jun-10 | 237 KiB |
eglot-0.8.tar.lz | 2018-Jun-01 | 236 KiB |
eglot-0.7.tar.lz | 2018-May-30 | 45.7 KiB |
eglot-0.6.tar.lz | 2018-May-27 | 45.1 KiB |
eglot-0.5.tar.lz | 2018-May-26 | 44.6 KiB |
eglot-0.4.tar.lz | 2018-May-21 | 40.5 KiB |
eglot-0.3.tar.lz | 2018-May-17 | 38.9 KiB |
eglot-0.2.tar.lz | 2018-May-15 | 38.3 KiB |
eglot-0.1.tar.lz | 2018-May-15 | 37.6 KiB |
In practice, this removes the need for Eglot to "officially" bless one server over another. Thanks to Felicián Németh for the original idea.
Thanks to Brian Cully for the minimalist approach.
(also thanks to Felipe Lema who conducted many early experiments in [#463][github#463])
eglot-ignored-server-capabilities
now correctly spelled ([#724][github#724])This user-visible variable used to be spelled
eglot-ignored-server-capabilites
, which is still a valid but
obsolete name.
This is activated by a new customization option
eglot-extend-to-xref
, which defaults to nil.
Thanks to Michael Livshin for the investigation an elegant solution.
M-x eglot-code-actions
accepts an optional action-kind
argument,
specified interactively with C-u
. Other shortcuts call specific
actions directly (eglot-code-action-inline
,
eglot-code-action-extract
, eglot-code-action-rewrite
,
eglot-code-action-organize-imports
and
eglot-code-action-quickfix
). One can create own shortcuts for code
actions with specific a kind by calling eglot-code-actions
from
elisp.
eglot-shutdown-server
([#643][github#643])eglot-withhold-process-id
([#722][github#722])If non-nil, Eglot will not send the Emacs process id to the language server. This can be useful when using docker to run a language server.
eglot-server-programs
.Thanks to Ingo Lohmar for the original implementation.
Such sources include as LSP's signature, hover and also the Flymake
diagnostic messages. They can all be presented in the echo area
(space permitting), or via C-h .
. For now, composition of different
sources can be customized using eldoc-documentation-strategy
,
eldoc-echo-area-use-multiline-p
and eldoc-prefer-doc-buffer
.
The variables eglot-put-doc-in-help-buffer
and
eglot-auto-display-help-buffer
have been removed.
It seems the majority of servers now comply with the language server
specification when it comes to handling non-ASCII texts. Therefore
the default values of eglot-move-to-column-function
and
eglot-current-column-function
have been changed. The documentations
of these variables help to restore the old behavior.
Also a new section "Per-project server configuration" in the README.md should answer some faq's in this regard.
Thanks a lot to Felicián Németh, Ingo Lohmar, and everyone else who helped out!
Similar to what was already the case with Flymake, Eldoc and Xref, use
just the backend that can do something useful in Eglot,
company-capf
. See eglot-stay-out-of
to opt out of this.
eglot-autoshutdown
to disconnect after last buffer killed ([#217][github#217], [#270][github#270])... ...