From 019264fc55b88135f4d3ca75adb16d71775d56b7 Mon Sep 17 00:00:00 2001 From: "Chai T. Rex" Date: Mon, 17 Feb 2025 23:48:39 -0500 Subject: [PATCH 1/3] Add Zed to dev guide suggested workflows page --- src/building/suggested.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/building/suggested.md b/src/building/suggested.md index 2c6c3fe1..5c041d6c 100644 --- a/src/building/suggested.md +++ b/src/building/suggested.md @@ -154,6 +154,16 @@ You can run `./x setup editor` and select `helix`, which will prompt you to create `languages.toml` with the recommended configuration for Helix. The recommended settings live at [`src/etc/rust_analyzer_helix.toml`]. +### Zed + +Zed comes with built-in LSP and rust-analyzer support. +It can be configured through `.zed/settings.json`, as described +[here](https://zed.dev/docs/configuring-languages). Selecting `zed` +in `./x setup editor` will prompt you to create a `.zed/settings.json` +file which will configure Zed with the recommended configuration. The +recommended `rust-analyzer` settings live +at [`src/etc/rust_analyzer_zed.json`]. + ## Check, check, and check again When doing simple refactoring, it can be useful to run `./x check` @@ -381,4 +391,5 @@ load this completion. [`src/etc/rust_analyzer_settings.json`]: https://github.com/rust-lang/rust/blob/master/src/etc/rust_analyzer_settings.json [`src/etc/rust_analyzer_eglot.el`]: https://github.com/rust-lang/rust/blob/master/src/etc/rust_analyzer_eglot.el [`src/etc/rust_analyzer_helix.toml`]: https://github.com/rust-lang/rust/blob/master/src/etc/rust_analyzer_helix.toml +[`src/etc/rust_analyzer_zed.json`]: https://github.com/rust-lang/rust/blob/master/src/etc/rust_analyzer_zed.json [`src/etc/pre-push.sh`]: https://github.com/rust-lang/rust/blob/master/src/etc/pre-push.sh From 209dd46dad6a9ef6814b8d785a30ee4cc7304653 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 18 Feb 2025 10:28:36 -0600 Subject: [PATCH 2/3] docs(dev): Remove reference to features_untracked This was removed in #114723 --- src/implementing_new_features.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/implementing_new_features.md b/src/implementing_new_features.md index 5b67ccd7..c77b872c 100644 --- a/src/implementing_new_features.md +++ b/src/implementing_new_features.md @@ -167,9 +167,7 @@ a new unstable feature: 1. Prevent usage of the new feature unless the feature gate is set. You can check it in most places in the compiler using the - expression `tcx.features().$feature_name` (or - `sess.features_untracked().$feature_name` if the - tcx is unavailable) + expression `tcx.features().$feature_name` If the feature gate is not set, you should either maintain the pre-feature behavior or raise an error, depending on From 1520629844fc748359152008611f003e577971bd Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 18 Feb 2025 10:35:13 -0600 Subject: [PATCH 3/3] docs(dev): Access features as functions, not members This was changed in #132027 --- src/implementing_new_features.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/implementing_new_features.md b/src/implementing_new_features.md index c77b872c..fda38ef4 100644 --- a/src/implementing_new_features.md +++ b/src/implementing_new_features.md @@ -167,7 +167,7 @@ a new unstable feature: 1. Prevent usage of the new feature unless the feature gate is set. You can check it in most places in the compiler using the - expression `tcx.features().$feature_name` + expression `tcx.features().$feature_name()` If the feature gate is not set, you should either maintain the pre-feature behavior or raise an error, depending on