Skip to content

Commit

Permalink
Docs: Using rust-analyzer from rustup
Browse files Browse the repository at this point in the history
Also discourage users from using rls
  • Loading branch information
psibi committed Feb 14, 2023
1 parent 4923724 commit 174b2c8
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 174b2c8

Please sign in to comment.