GNU-devel ELPA - eglot

eglot

Description
Client for Language Server Protocol (LSP) servers
Latest
eglot-1.8.0.20220123.140617.tar, 2022-Jan-23, 250 KiB
Maintainer
João Távora <joaotavora@gmail.com>
Website
https://github.com/joaotavora/eglot
Browse ELPA's repository
CGit or Gitweb
Badge

To install this package, run in Emacs:

M-x package-install RET eglot RET

Full description

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

Typing 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 minibuffer for these things.  Actually, the
server does not need to be running locally: you can connect to a
running server via TCP by entering a <host:port> syntax.

If the connection is successful, you should see an `eglot'
indicator pop up in your mode-line.  More importantly, this means
that current *and future* file buffers of that major mode *inside
your current project* automatically become \"managed\" by the LSP
server.  In other words, information about their content is
exchanged periodically to provide enhanced code analysis using
`xref-find-definitions', `flymake-mode', `eldoc-mode',
`completion-at-point', among others.

To "unmanage" these buffers, shutdown the server with
M-x eglot-shutdown.

To start an eglot session automatically when a foo-mode buffer is
visited, you can put this in your init file:

  (add-hook 'foo-mode-hook 'eglot-ensure)

Old versions

eglot-1.8.0.20220122.35947.tar.lz2022-Jan-2252.1 KiB
eglot-1.8.0.20220120.220653.tar.lz2022-Jan-2151.9 KiB
eglot-1.8.0.20220120.184343.tar.lz2022-Jan-2051.3 KiB
eglot-1.8.0.20220119.211755.tar.lz2022-Jan-1951.3 KiB
eglot-1.8.0.20220118.2056.tar.lz2022-Jan-1851.3 KiB
eglot-1.8.0.20220117.211649.tar.lz2022-Jan-1751.3 KiB
eglot-1.8.0.20220116.131759.tar.lz2022-Jan-1651.4 KiB
eglot-1.8.0.20220112.183522.tar.lz2022-Jan-1251.1 KiB
eglot-1.7.0.20220112.72819.tar.lz2022-Jan-1251.0 KiB
eglot-1.6.0.20200416.93101.tar.lz2020-Dec-14 262 KiB

News

(upcoming)

Show project wide diagnosics ([#810][github#810])

Some LSP servers report diagnostics for all files in the current workspace. Flymake has as of version 1.2.1 the option to show diagnostics from buffers other than the currently visited one. The command M-x flymake-show-project-diagnostics will now show all diagnostics relevant to a workspace.

Support optional completion tags ([#797][github#797])

A [completion-item tag][completiontag] can be used to tell the editor how to render a completion. Presently, one kind of tag exists, denoting its corresponding completion as obsolete.

Support optional diagnostic tags ([#794][github#794])

A [diagnostic tag][diagnostictag] can indicate either "unused or unnecessary code" or "deprecated or obsolete code". Following the rendering suggestions in the protocol, we fade out unnecessary code and strike-through deprecated code.

The Rust language server is now rust-analyzer by default ([#803][github#803])

Eglot will now prefer starting "rust-analazyer" to "rls" when it is available. The special support code for RLS has been removed.

New servers have been added to eglot-server-programs
  • clojure-lsp ([#813][github#813])
  • racket-langserver ([#694][github#694])

1.8 (12/1/2022)

Multiple servers supported out-of-box for same major mode ([#688][github#688])

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.

TRAMP support ([#637][github#637], [#463][github#463], [#84][github#84])

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.

Manage cross-referenced files outside project ([#76][github#76], [#686][github#686], [#695][github#695])

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.

Code action shortcuts ([#411][github#411])

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.

New command eglot-shutdown-server ([#643][github#643]) New variable 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.

Several new servers have been added to eglot-server-programs
  • cmake-language-server ([#787][github#787])
  • css-languageserver ([#204][github#204], [#769][github#769])
  • fortls ([#603][github#603])
  • html-languageserver ([#204][github#204], [#769][github#769])
  • json-languageserver ([#204][github#204], [#769][github#769])
  • lua-lsp ([#721][github#721])
  • mint ls ([#750][github#750])
  • pyright ([#742][github#742])
  • vim-language-server ([#787][github#787])
  • yaml-language-server ([#751][github#751])
  • zls ([#646][github#646])

1.7 (16/12/2020)

Support hierarchical symbols in Imenu ([#303][github#303])

Thanks to Ingo Lohmar for the original implementation.

Handle multiple "documentation at point" sources ([#439][github#439], [#494][github#494], [#481][github#481], [#454][github#454])

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, ... ...