summaryrefslogtreecommitdiff
path: root/src/tools/rust-analyzer/docs/user/manual.adoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/rust-analyzer/docs/user/manual.adoc')
-rw-r--r--src/tools/rust-analyzer/docs/user/manual.adoc16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/tools/rust-analyzer/docs/user/manual.adoc b/src/tools/rust-analyzer/docs/user/manual.adoc
index 5dafd1a4c8c..b605de4c7b8 100644
--- a/src/tools/rust-analyzer/docs/user/manual.adoc
+++ b/src/tools/rust-analyzer/docs/user/manual.adoc
@@ -237,7 +237,7 @@ To use `rust-analyzer`, you need to install and enable one of the two popular LS
==== Eglot
-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.
+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.
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
@@ -246,6 +246,15 @@ After installing Eglot, e.g. via `M-x package-install` (not needed from Emacs 29
(add-hook 'rust-mode-hook 'eglot-ensure)
----
+To enable clippy, you will need to configure the initialization options to pass the `check.command` setting.
+
+[source,emacs-lisp]
+----
+(add-to-list 'eglot-server-programs
+ '((rust-ts-mode rust-mode) .
+ ("rust-analyzer" :initializationOptions (:check (:command "clippy")))))
+----
+
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
https://github.com/joaotavora/eglot/blob/master/README.md[Eglot readme].
@@ -555,6 +564,11 @@ There is a package named `ra_ap_rust_analyzer` available on https://crates.io/cr
For more details, see https://github.com/rust-lang/rust-analyzer/blob/master/.github/workflows/publish.yml[the publish workflow].
+=== Zed
+
+https://zed.dev[Zed] has native `rust-analyzer` support.
+If the LSP binary is not available, Zed can install it when opening a Rust file.
+
== Troubleshooting
Start with looking at the rust-analyzer version.