Skip to content

Commit

Permalink
Merge pull request #493 from psibi/docs-rust-analyzer
Browse files Browse the repository at this point in the history
Docs: Using rust-analyzer from rustup
  • Loading branch information
psibi authored Feb 15, 2023
2 parents a5fc66c + 174b2c8 commit 39423d1
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 @@ -312,18 +312,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 39423d1

Please sign in to comment.