From 51bff477c9a5f1d826f4636b426b9ae73141cee6 Mon Sep 17 00:00:00 2001 From: Green-Avocado Date: Thu, 2 Dec 2021 09:10:00 -0800 Subject: [PATCH 1/3] add nightly rustfmt example --- README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 599187c..a2de79c 100644 --- a/README.md +++ b/README.md @@ -41,9 +41,11 @@ However, you may wish to install `rustup` with your OS package manager instead o It first looks for `rust-analyzer.json`. If the file does not exists, it then checks `.config/rust-analyzer.json`. -### Example +Refer to the [rust-analyzer User Manual](https://rust-analyzer.github.io/manual.html#configuration) for the supported config options. + +### Examples -`.config/rust-analyzer.json` +#### enable proc-macro support (from the [rust-analyzer User Manual](https://rust-analyzer.github.io/manual.html#configuration)) ```json { @@ -56,7 +58,15 @@ If the file does not exists, it then checks `.config/rust-analyzer.json`. } ``` -Refer to the [rust-analyzer User Manual](https://rust-analyzer.github.io/manual.html#configuration) for the supported config options. +#### configure rust-fmt + +```json +{ + "rustfmt": { + "overrideCommand": "cargo +nightly fmt" + } +} +``` ## Commands From c83052a80ea17fd0dbb4ca20656ce62ada2a4fe5 Mon Sep 17 00:00:00 2001 From: Green-Avocado Date: Thu, 2 Dec 2021 09:11:22 -0800 Subject: [PATCH 2/3] edit links to the user manual --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a2de79c..7c4f80f 100644 --- a/README.md +++ b/README.md @@ -41,11 +41,11 @@ However, you may wish to install `rustup` with your OS package manager instead o It first looks for `rust-analyzer.json`. If the file does not exists, it then checks `.config/rust-analyzer.json`. -Refer to the [rust-analyzer User Manual](https://rust-analyzer.github.io/manual.html#configuration) for the supported config options. +Refer to the rust-analyzer [User Manual](https://rust-analyzer.github.io/manual.html#configuration) for the supported config options. ### Examples -#### enable proc-macro support (from the [rust-analyzer User Manual](https://rust-analyzer.github.io/manual.html#configuration)) +#### enable proc-macro support (from the [User Manual](https://rust-analyzer.github.io/manual.html#configuration)) ```json { From 85c1d5a5c0d9d79b0e50bf7c20528d531da706f2 Mon Sep 17 00:00:00 2001 From: Green-Avocado Date: Thu, 2 Dec 2021 09:28:15 -0800 Subject: [PATCH 3/3] fix nightly fmt example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7c4f80f..ffade0a 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ Refer to the rust-analyzer [User Manual](https://rust-analyzer.github.io/manual. ```json { "rustfmt": { - "overrideCommand": "cargo +nightly fmt" + "extraArgs": ["+nightly"] } } ```