aboutsummaryrefslogtreecommitdiff
path: root/docs/user
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-05-25 13:15:48 +0100
committerGitHub <[email protected]>2021-05-25 13:15:48 +0100
commit835cf55887527bd1953cb7004259214f7c215095 (patch)
treedadc26f171812663779a80cbe9344e9a004b37e7 /docs/user
parentb7414fa14a85f4acd37b5bdfdc2a4ab97a072bd2 (diff)
parenta90b9a5872c9c916733816e1e0d8c95cb09bfcba (diff)
Merge #8767
8767: implement range formatting r=matklad a=euclio Fixes #7580. This PR implements the `textDocument/rangeFormatting` request using `rustfmt`'s `--file-lines` option. Still needs some tests. What I want to know is how I should handle the instability of the `--file-lines` option. It's still unstable in rustfmt, so it's only available on nightly, and needs a special flag to enable. Is there a way for `rust-analyzer` to detect if it's using nightly rustfmt, or for users to opt-in? Co-authored-by: Andy Russell <[email protected]>
Diffstat (limited to 'docs/user')
-rw-r--r--docs/user/generated_config.adoc7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc
index c02bab7cc..f3da82feb 100644
--- a/docs/user/generated_config.adoc
+++ b/docs/user/generated_config.adoc
@@ -346,6 +346,13 @@ Additional arguments to `rustfmt`.
346Advanced option, fully override the command rust-analyzer uses for 346Advanced option, fully override the command rust-analyzer uses for
347formatting. 347formatting.
348-- 348--
349[[rust-analyzer.rustfmt.enableRangeFormatting]]rust-analyzer.rustfmt.enableRangeFormatting (default: `false`)::
350+
351--
352Enables the use of rustfmt's unstable range formatting command for the
353`textDocument/rangeFormatting` request. The rustfmt option is unstable and only
354available on a nightly build.
355--
349[[rust-analyzer.workspace.symbol.search.scope]]rust-analyzer.workspace.symbol.search.scope (default: `"workspace"`):: 356[[rust-analyzer.workspace.symbol.search.scope]]rust-analyzer.workspace.symbol.search.scope (default: `"workspace"`)::
350+ 357+
351-- 358--