diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-04-28 11:13:52 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-28 11:13:52 +0100 |
commit | 49b219b1035e20143818d409404b5e6f19a7ad1d (patch) | |
tree | 9e8594b1d76b943a6eb287937db53e87e7f3a956 | |
parent | fb45d2adeccfc6732b702cd8fa2911b385bc15b7 (diff) | |
parent | 5c1a90103528dd3a93d3d8a2186276e9ebd0d400 (diff) |
Merge #8683
8683: internal: ensure that client and server-side configs are not mixed up r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
-rw-r--r-- | crates/rust-analyzer/src/config.rs | 7 | ||||
-rw-r--r-- | docs/user/generated_config.adoc | 5 | ||||
-rw-r--r-- | editors/code/package.json | 12 |
3 files changed, 11 insertions, 13 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index 28bbbce19..8879a9161 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs | |||
@@ -27,6 +27,11 @@ use crate::{ | |||
27 | line_index::OffsetEncoding, lsp_ext::supports_utf8, | 27 | line_index::OffsetEncoding, lsp_ext::supports_utf8, |
28 | }; | 28 | }; |
29 | 29 | ||
30 | // Defines the server-side configuration of the rust-analyzer. We generate | ||
31 | // *parts* of VS Code's `package.json` config from this. | ||
32 | // | ||
33 | // However, editor specific config, which the server doesn't know about, should | ||
34 | // be specified directly in `package.json`. | ||
30 | config_data! { | 35 | config_data! { |
31 | struct ConfigData { | 36 | struct ConfigData { |
32 | /// The strategy to use when inserting new imports or merging imports. | 37 | /// The strategy to use when inserting new imports or merging imports. |
@@ -145,8 +150,6 @@ config_data! { | |||
145 | inlayHints_parameterHints: bool = "true", | 150 | inlayHints_parameterHints: bool = "true", |
146 | /// Whether to show inlay type hints for variables. | 151 | /// Whether to show inlay type hints for variables. |
147 | inlayHints_typeHints: bool = "true", | 152 | inlayHints_typeHints: bool = "true", |
148 | /// Whether inlay hints font size should be smaller than editor's font size. | ||
149 | inlayHints_smallerHints: bool = "true", | ||
150 | 153 | ||
151 | /// Whether to show `Debug` lens. Only applies when | 154 | /// Whether to show `Debug` lens. Only applies when |
152 | /// `#rust-analyzer.lens.enable#` is set. | 155 | /// `#rust-analyzer.lens.enable#` is set. |
diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc index db3c5f7bb..e28423e99 100644 --- a/docs/user/generated_config.adoc +++ b/docs/user/generated_config.adoc | |||
@@ -234,11 +234,6 @@ site. | |||
234 | -- | 234 | -- |
235 | Whether to show inlay type hints for variables. | 235 | Whether to show inlay type hints for variables. |
236 | -- | 236 | -- |
237 | [[rust-analyzer.inlayHints.smallerHints]]rust-analyzer.inlayHints.smallerHints (default: `true`):: | ||
238 | + | ||
239 | -- | ||
240 | Whether inlay hints font size should be smaller than editor's font size. | ||
241 | -- | ||
242 | [[rust-analyzer.lens.debug]]rust-analyzer.lens.debug (default: `true`):: | 237 | [[rust-analyzer.lens.debug]]rust-analyzer.lens.debug (default: `true`):: |
243 | + | 238 | + |
244 | -- | 239 | -- |
diff --git a/editors/code/package.json b/editors/code/package.json index 35b50e669..67e10df7e 100644 --- a/editors/code/package.json +++ b/editors/code/package.json | |||
@@ -283,6 +283,11 @@ | |||
283 | "default": true, | 283 | "default": true, |
284 | "description": "Whether to show inlay hints." | 284 | "description": "Whether to show inlay hints." |
285 | }, | 285 | }, |
286 | "rust-analyzer.inlayHints.smallerHints": { | ||
287 | "type": "boolean", | ||
288 | "default": true, | ||
289 | "description": "Whether inlay hints font size should be smaller than editor's font size." | ||
290 | }, | ||
286 | "rust-analyzer.updates.channel": { | 291 | "rust-analyzer.updates.channel": { |
287 | "type": "string", | 292 | "type": "string", |
288 | "enum": [ | 293 | "enum": [ |
@@ -353,7 +358,7 @@ | |||
353 | "Use [MS C++ tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools)" | 358 | "Use [MS C++ tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools)" |
354 | ] | 359 | ] |
355 | }, | 360 | }, |
356 | "rust-analyzer.debug.sourceFileMap": { | 361 | "rust-analyzer.debug.sourceFileMap": { |
357 | "type": ["object", "string"], | 362 | "type": ["object", "string"], |
358 | "const": "auto", | 363 | "const": "auto", |
359 | "description": "Optional source file mappings passed to the debug engine.", | 364 | "description": "Optional source file mappings passed to the debug engine.", |
@@ -654,11 +659,6 @@ | |||
654 | "default": true, | 659 | "default": true, |
655 | "type": "boolean" | 660 | "type": "boolean" |
656 | }, | 661 | }, |
657 | "rust-analyzer.inlayHints.smallerHints": { | ||
658 | "markdownDescription": "Whether inlay hints font size should be smaller than editor's font size.", | ||
659 | "default": true, | ||
660 | "type": "boolean" | ||
661 | }, | ||
662 | "rust-analyzer.lens.debug": { | 662 | "rust-analyzer.lens.debug": { |
663 | "markdownDescription": "Whether to show `Debug` lens. Only applies when\n`#rust-analyzer.lens.enable#` is set.", | 663 | "markdownDescription": "Whether to show `Debug` lens. Only applies when\n`#rust-analyzer.lens.enable#` is set.", |
664 | "default": true, | 664 | "default": true, |