aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/user/README.md17
1 files changed, 16 insertions, 1 deletions
diff --git a/docs/user/README.md b/docs/user/README.md
index 5ec8fb25d..04c349342 100644
--- a/docs/user/README.md
+++ b/docs/user/README.md
@@ -204,4 +204,19 @@ Installation:
204 204
205* You can now invoke the command palette and type LSP enable to locally/globally enable the rust-analyzer LSP (type LSP enable, then choose either locally or globally, then select rust-analyzer) 205* You can now invoke the command palette and type LSP enable to locally/globally enable the rust-analyzer LSP (type LSP enable, then choose either locally or globally, then select rust-analyzer)
206 206
207* Note that `ra_lsp_server` binary must be in `$PATH` for this to work. If it's not the case, you can specify full path to the binary, which is typically `.cargo/bin/ra_lsp_server`. 207### Setting up the `PATH` variable
208
209On Unix systems, `rustup` adds `~/.cargo/bin` to `PATH` by modifying the shell's
210startup file. Depending on your configuration, your Desktop Environment might not
211actually load it. If you find that `rust-analyzer` only runs when starting the
212editor from the terminal, you will have to set up your `PATH` variable manually.
213
214There are a couple of ways to do that:
215
216- for Code, set `rust-analyzer.raLspServerPath` to `~/.cargo/bin` (the `~` is
217 automatically resolved by the extension)
218- copy the binary to a location that is already in `PATH`, e.g. `/usr/local/bin`
219- on Linux, use PAM to configure the `PATH` variable, by e.g. putting
220 `PATH DEFAULT=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:@{HOME}/.cargo/bin:@{HOME}/.local/bin`
221 in your `~/.pam_environment` file; note that this might interfere with other
222 defaults set by the system administrator via `/etc/environment`.