From 174b2c8ccb1dcea7a0f3026568fa62771d3baa37 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Tue, 14 Feb 2023 10:04:49 +0530 Subject: [PATCH] Docs: Using rust-analyzer from rustup Also discourage users from using rls --- README.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 39f90f37..3b78df00 100644 --- a/README.md +++ b/README.md @@ -311,18 +311,24 @@ to the lsp client or server you are using. ### Server -rust-analyzer is the default and can be changed to rls. lsp-mode -related code was moved to the lsp-mode repo. `rustic-lsp-server` sets -the value of `lsp-rust-server`. +rust-analyzer is the default and can be changed to rls if required (Note that rls +is deprecated and is slated to be removed). lsp-mode related code was +moved to the lsp-mode repo. `rustic-lsp-server` sets the value of +`lsp-rust-server`. + +Change rust-analyzer path. ``` emacs-lisp -(setq rustic-lsp-server 'rls) +(setq rustic-analyzer-command '("~/.cargo/bin/rust-analyzer")) ``` -Change rust-analyzer path. +If you are using rustup to [manage your rust-analyzer](https://rust-analyzer.github.io/manual.html#rustup), you would +have to configure like this to make it work with `use-package`: ``` emacs-lisp -(setq rustic-analyzer-command '("~/.cargo/bin/rust-analyzer")) +(use-package rustic + :custom + (rustic-analyzer-command '("rustup" "run" "stable" "rust-analyzer"))) ``` #### Automatic server installation