Skip to content

Commit

Permalink
Add link to vscode settings in Rust repo
Browse files Browse the repository at this point in the history
  • Loading branch information
clubby789 committed Feb 9, 2023
1 parent df5aee0 commit 9b8b76e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/building/suggested.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,16 @@ of these tools when hacking on `rustc`. For example, `x.py setup` will prompt
you to create a `.vscode/settings.json` file which will configure Visual Studio code.
This will ask `rust-analyzer` to use `./x.py check` to check the sources, and the
stage 0 rustfmt to format them.
The recommended `rust-analyzer` settings live at [`src/etc/vscode_settings.json`].

If you have enough free disk space and you would like to be able to run `x.py` commands while
rust-analyzer runs in the background, you can also add `--build-dir build-rust-analyzer` to the
`overrideCommand` to avoid x.py locking.

If you're running `coc.nvim`, you can use `:CocLocalConfig` to create a
`.vim/coc-settings.json` and copy the settings from [this file](https://github.com/rust-lang/rust/blob/master/src/etc/vscode_settings.json).
`.vim/coc-settings.json` and copy the settings from [`src/etc/vscode_settings.json`].

[`src/etc/vscode_settings.json`]: https://github.com/rust-lang/rust/blob/master/src/etc/vscode_settings.json

If running `./x.py check` on save is inconvenient, in VS Code you can use a [Build
Task] instead:
Expand Down

0 comments on commit 9b8b76e

Please sign in to comment.