Skip to content

Commit c89e54e

Browse files
committed
Removed coc since there is already a section and cleaned up wording.
1 parent 5f48eb9 commit c89e54e

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

src/building/suggested.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,14 @@ in your `.vscode/settings.json` file. This will ask `rust-analyzer` to use
5757
`./x.py check` to check the sources, and the stage 0 rustfmt to format them.
5858

5959

60-
For Neovim users there are several options for configuring for rustc. You can use the native LSP
61-
server and make your own logic for changing the rust-analyzer configuration to the above. You can
62-
also use [nlsp-settings](https://github.com/tamago324/nlsp-settings.nvim), which allows for
63-
project-local configuration files. This plugin allows for the above JSON to be directly put in to
64-
a file located at `rust/.nlsp-settings/rust_analyzer.json`. If you use
65-
[coc-rust-analyzer](https://github.com/fannheyward/coc-rust-analyzer) you can also use the above
66-
JSON, but placed in `rust/.vim/coc-settings.json`.
60+
For Neovim users there are several options for configuring for rustc. The easiest way is by using
61+
[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.
6765

68-
Below is the Lua needed to configure the native Neovim LSP the same as the above VSCode
69-
configuration
66+
Another way is without a plugin, and creating your own logic in your configuration. The required
67+
Lua for doing so is below.
7068

7169
```lua
7270
{
@@ -101,15 +99,15 @@ configuration
10199
}
102100
```
103101

104-
If you have enough free disk space and you would like to be able to run `x.py` commands while
105-
rust-analyzer runs in the background, you can also add `--build-dir build-rust-analyzer` to the
106-
`overrideCommand` to avoid x.py locking.
107-
108102
If you're running `coc.nvim`, you can use `:CocLocalConfig` to create a
109103
`.vim/coc-settings.json` and enter the same settings as above, but replacing
110104
`editor.formatOnSave: true,` with
111105
`"coc.preferences.formatOnSaveFiletypes": ["rust"],`.
112106

107+
If you have enough free disk space and you would like to be able to run `x.py` commands while
108+
rust-analyzer runs in the background, you can also add `--build-dir build-rust-analyzer` to the
109+
`overrideCommand` to avoid x.py locking.
110+
113111
If running `./x.py check` on save is inconvenient, in VS Code you can use a [Build
114112
Task] instead:
115113

0 commit comments

Comments
 (0)