Skip to content

Commit c4d5fa6

Browse files
authored
Rollup merge of #127793 - ChaiTRex:zed_support, r=Kobzol
Added project-specific Zed IDE settings This repository currently has project-specific VS Code IDE settings in `.vscode` and `compiler/rustc_codegen_cranelift/.vscode`. Now there are equivalent project-specific Zed IDE settings alongside those. This fixes `rust-analyzer` not being able to properly handle this project. Note that: 1. The contents of `src/tools/rust-analyzer/.vscode` could not be translated to Zed, as they aren't basic IDE settings. 2. One of the VS Code settings in `.vscode` has no corresponding setting in Zed, and so this has been noted like this: ```json "_settings_only_in_vs_code_not_yet_in_zed": { "git.detectSubmodulesLimit": 20 }, ```
2 parents 654035f + 019264f commit c4d5fa6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/building/suggested.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,16 @@ You can run `./x setup editor` and select `helix`, which will prompt you to
154154
create `languages.toml` with the recommended configuration for Helix. The
155155
recommended settings live at [`src/etc/rust_analyzer_helix.toml`].
156156

157+
### Zed
158+
159+
Zed comes with built-in LSP and rust-analyzer support.
160+
It can be configured through `.zed/settings.json`, as described
161+
[here](https://zed.dev/docs/configuring-languages). Selecting `zed`
162+
in `./x setup editor` will prompt you to create a `.zed/settings.json`
163+
file which will configure Zed with the recommended configuration. The
164+
recommended `rust-analyzer` settings live
165+
at [`src/etc/rust_analyzer_zed.json`].
166+
157167
## Check, check, and check again
158168

159169
When doing simple refactoring, it can be useful to run `./x check`
@@ -381,4 +391,5 @@ load this completion.
381391
[`src/etc/rust_analyzer_settings.json`]: https://github.com/rust-lang/rust/blob/master/src/etc/rust_analyzer_settings.json
382392
[`src/etc/rust_analyzer_eglot.el`]: https://github.com/rust-lang/rust/blob/master/src/etc/rust_analyzer_eglot.el
383393
[`src/etc/rust_analyzer_helix.toml`]: https://github.com/rust-lang/rust/blob/master/src/etc/rust_analyzer_helix.toml
394+
[`src/etc/rust_analyzer_zed.json`]: https://github.com/rust-lang/rust/blob/master/src/etc/rust_analyzer_zed.json
384395
[`src/etc/pre-push.sh`]: https://github.com/rust-lang/rust/blob/master/src/etc/pre-push.sh

0 commit comments

Comments
 (0)