Skip to content

Commit 983094a

Browse files
committed
Auto merge of rust-lang#15764 - Wilfred:emacs_docs, r=lnicola
Expand Emacs documentation Emacs 29 is now released, and include an example of enabling clippy.
2 parents 6572ec8 + 03bec11 commit 983094a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

docs/user/manual.adoc

+10-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ To use `rust-analyzer`, you need to install and enable one of the two popular LS
237237

238238
==== Eglot
239239

240-
Eglot is the more minimalistic and lightweight LSP client for Emacs, integrates well with existing Emacs functionality and will be built into Emacs starting from release 29.
240+
Eglot is the more minimalistic and lightweight LSP client for Emacs, integrates well with existing Emacs functionality and is built into Emacs starting from release 29.
241241

242242
After installing Eglot, e.g. via `M-x package-install` (not needed from Emacs 29), you can enable it via the `M-x eglot` command or load it automatically in `rust-mode` via
243243

@@ -246,6 +246,15 @@ After installing Eglot, e.g. via `M-x package-install` (not needed from Emacs 29
246246
(add-hook 'rust-mode-hook 'eglot-ensure)
247247
----
248248

249+
To enable clippy, you will need to configure the initialization options to pass the `check.command` setting.
250+
251+
[source,emacs-lisp]
252+
----
253+
(add-to-list 'eglot-server-programs
254+
'((rust-ts-mode rust-mode) .
255+
("rust-analyzer" :initializationOptions (:check (:command "clippy")))))
256+
----
257+
249258
For more detailed instructions and options see the https://joaotavora.github.io/eglot[Eglot manual] (also available from Emacs via `M-x info`) and the
250259
https://github.com/joaotavora/eglot/blob/master/README.md[Eglot readme].
251260

0 commit comments

Comments
 (0)