Skip to content

Commit 336540a

Browse files
committed
Make the steps clear
First open a Rust buffer Then update RA settings If you don't open a buffer first then nothing will happen. This is because the plugin makes a raw LSP RPC, so RA must be attached.
1 parent 2d66853 commit 336540a

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/building/suggested.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,17 @@ in your `.vscode/settings.json` file. This will ask `rust-analyzer` to use
5959

6060
For Neovim users there are several options for configuring for rustc. The easiest way is by using
6161
[nlsp-settings](https://github.com/tamago324/nlsp-settings.nvim), which allows for project-local
62-
configuration files with the native LSP. First install the plugin by however you manage your
63-
plugins. Then run `:LspSettings local rust_analyzer` to create a JSON configuration file. Then
64-
just paste the above JSON in.
62+
configuration files with the native LSP. The steps for how to use it are below.
63+
64+
1. First install the plugin
65+
2. Run `:LspSettings local rust_analyzer` while the rust repo is open.
66+
67+
This will create and open a JSON file to put the above JSON in.
68+
69+
3. Open a Rust buffer that causes Rust Analyzer to attach.
70+
4. Run `:LspSettings update rust_analyzer`
71+
72+
The final step must be repeated every time you open Neovim after you open a Rust buffer.
6573

6674
Another way is without a plugin, and creating your own logic in your configuration. The required
6775
Lua for doing so is below.

0 commit comments

Comments
 (0)