You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/building/suggested.md
+10-12Lines changed: 10 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,16 +28,14 @@ This will ask `rust-analyzer` to use `./x.py check` to check the sources, and th
28
28
stage 0 rustfmt to format them.
29
29
30
30
31
-
For Neovim users there are several options for configuring for rustc. You can use the native LSP
32
-
server and make your own logic for changing the rust-analyzer configuration to the above. You can
33
-
also use [nlsp-settings](https://github.com/tamago324/nlsp-settings.nvim), which allows for
34
-
project-local configuration files. This plugin allows for the above JSON to be directly put in to
35
-
a file located at `rust/.nlsp-settings/rust_analyzer.json`. If you use
36
-
[coc-rust-analyzer](https://github.com/fannheyward/coc-rust-analyzer) you can also use the above
37
-
JSON, but placed in `rust/.vim/coc-settings.json`.
31
+
For Neovim users there are several options for configuring for rustc. The easiest way is by using
32
+
[nlsp-settings](https://github.com/tamago324/nlsp-settings.nvim), which allows for project-local
33
+
configuration files with the native LSP. First install the plugin by however you manage your
34
+
plugins. Then run `:LspSettings local rust_analyzer` to create a JSON configuration file. Then
35
+
just paste the above JSON in.
38
36
39
-
Below is the Lua needed to configure the native Neovim LSP the same as the above VSCode
40
-
configuration
37
+
Another way is without a plugin, and creating your own logic in your configuration. The required
38
+
Lua for doing so is below.
41
39
42
40
```lua
43
41
{
@@ -72,13 +70,13 @@ configuration
72
70
}
73
71
```
74
72
73
+
If you're running `coc.nvim`, you can use `:CocLocalConfig` to create a
74
+
`.vim/coc-settings.json` and copy the settings from [this file](https://github.com/rust-lang/rust/blob/master/src/etc/vscode_settings.json).
75
+
75
76
If you have enough free disk space and you would like to be able to run `x.py` commands while
76
77
rust-analyzer runs in the background, you can also add `--build-dir build-rust-analyzer` to the
77
78
`overrideCommand` to avoid x.py locking.
78
79
79
-
If you're running `coc.nvim`, you can use `:CocLocalConfig` to create a
80
-
`.vim/coc-settings.json` and copy the settings from [this file](https://github.com/rust-lang/rust/blob/master/src/etc/vscode_settings.json).
81
-
82
80
If running `./x.py check` on save is inconvenient, in VS Code you can use a [Build
0 commit comments