]> git.lizzy.rs Git - rust.git/blobdiff - docs/user/manual.adoc
chore(manual): update coc-rust-analyzer manual
[rust.git] / docs / user / manual.adoc
index 13165e8d3f0f88f2e04b175ca096445cd72af065..5f725f865aa4a1d26392217e6a84bc8ab4e16503 100644 (file)
@@ -67,16 +67,16 @@ To disable this notification put the following to `settings.json`
 ----
 ====
 
-The server binary is stored in:
+The server binary is stored in the extension install directory, which starts with `matklad.rust-analyzer-` and is located under:
 
-* Linux: `~/.config/Code/User/globalStorage/matklad.rust-analyzer`
-* Linux (Remote, such as WSL): `~/.vscode-server/data/User/globalStorage/matklad.rust-analyzer`
-* macOS: `~/Library/Application\ Support/Code/User/globalStorage/matklad.rust-analyzer`
-* Windows: `%APPDATA%\Code\User\globalStorage\matklad.rust-analyzer`
+* Linux: `~/.vscode/extensions`
+* Linux (Remote, such as WSL): `~/.vscode-server/extensions`
+* macOS: `~/.vscode/extensions`
+* Windows: `%USERPROFILE%\.vscode\extensions`
 
-However, if you are using a version of the extension with a bundled server binary and you are not running NixOS, the server binary might be instead running from: `~/.vscode/extensions/matklad.rust-analyzer-VERSION`.
+As an exception, on NixOS, the extension makes a copy of the server and stores it under `~/.config/Code/User/globalStorage/matklad.rust-analyzer`.
 
-Note that we only support two most recent versions of VS Code.
+Note that we only support the two most recent versions of VS Code.
 
 ==== Updates
 
@@ -86,27 +86,12 @@ It will ask your permission to download the matching language server version bin
 ===== Nightly
 
 We ship nightly releases for VS Code.
+You can opt in to these by switching to the pre-release version in the Code extension page or settings.
 To help us out with testing the newest code and follow the bleeding edge of our `master`, please use the following config:
 
-[source,json]
-----
-{ "rust-analyzer.updates.channel": "nightly" }
-----
-
-You will be prompted to install the `nightly` extension version.
-Just click `Download now` and from that moment you will get automatic updates every 24 hours.
-
-If you don't want to be asked for `Download now` every day when the new nightly version is released add the following to your `settings.json`:
-[source,json]
-----
-{ "rust-analyzer.updates.askBeforeDownload": false }
-----
-
-NOTE: Nightly extension should **only** be installed via the `Download now` action from VS Code.
-
 ==== Manual installation
 
-Alternatively, procure both `rust-analyzer.vsix` and your platform's matching `rust-analyzer-{platform}`, for example from the
+Alternatively, download a VSIX corresponding to your platform from the
 https://github.com/rust-analyzer/rust-analyzer/releases[releases] page.
 
 Install the extension with the `Extensions: Install from VSIX` command within VS Code, or from the command line via:
@@ -115,7 +100,8 @@ Install the extension with the `Extensions: Install from VSIX` command within VS
 $ code --install-extension /path/to/rust-analyzer.vsix
 ----
 
-Copy the `rust-analyzer-{platform}` binary anywhere, then add the path to your settings.json, for example:
+If you are running an unsupported platform, you can install `rust-analyzer-no-server.vsix` and compile or obtain a server binary.
+Copy the server anywhere, then add the path to your settings.json, for example:
 [source,json]
 ----
 { "rust-analyzer.server.path": "~/.local/bin/rust-analyzer-linux" }
@@ -123,7 +109,7 @@ Copy the `rust-analyzer-{platform}` binary anywhere, then add the path to your s
 
 ==== Building From Source
 
-Alternatively, both the server and the Code plugin can be installed from source:
+Both the server and the Code plugin can be installed from source:
 
 [source]
 ----
@@ -131,7 +117,7 @@ $ git clone https://github.com/rust-analyzer/rust-analyzer.git && cd rust-analyz
 $ cargo xtask install
 ----
 
-You'll need Cargo, nodejs and npm for this.
+You'll need Cargo, nodejs (matching a supported version of VS Code) and npm for this.
 
 Note that installing via `xtask install` does not work for VS Code Remote, instead you'll need to install the `.vsix` manually.
 
@@ -254,7 +240,6 @@ The are several LSP client implementations for vim or neovim:
    * same configurations as VSCode extension, `rust-analyzer.server.path`, `rust-analyzer.cargo.features` etc.
    * same commands too, `rust-analyzer.analyzerStatus`, `rust-analyzer.ssr` etc.
    * inlay hints for variables and method chaining, _Neovim Only_
-   * semantic highlighting is not implemented yet
 
 Note: for code actions, use `coc-codeaction-cursor` and `coc-codeaction-selected`; `coc-codeaction` and `coc-codeaction-line` are unlikely to be useful.
 
@@ -411,7 +396,9 @@ You'll need to close and reopen all .rs and Cargo files, or to restart the IDE,
 === Kate Text Editor
 
 Support for the language server protocol is built into Kate through the LSP plugin, which is included by default.
-It is preconfigured to use Rls for rust sources, but allows you to use rust-analyzer through a simple settings change.
+It is preconfigured to use rust-analyzer for Rust sources since Kate 21.12.
+
+Earlier versions allow you to use rust-analyzer through a simple settings change.
 In the LSP Client settings of Kate, copy the content of the third tab "default parameters" to the second tab "server configuration".
 Then in the configuration replace:
 [source,json]