about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAleksey Kladov <aleksey.kladov@gmail.com>2021-04-28 13:06:46 +0300
committerAleksey Kladov <aleksey.kladov@gmail.com>2021-04-28 13:13:30 +0300
commit5c1a90103528dd3a93d3d8a2186276e9ebd0d400 (patch)
tree9e8594b1d76b943a6eb287937db53e87e7f3a956
parentfb45d2adeccfc6732b702cd8fa2911b385bc15b7 (diff)
internal: ensure that client and server-side configs are not mixed up
https://github.com/rust-lang/rust/issues/84647 would help big time here.
-rw-r--r--crates/rust-analyzer/src/config.rs7
-rw-r--r--docs/user/generated_config.adoc5
-rw-r--r--editors/code/package.json12
3 files changed, 11 insertions, 13 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index 28bbbce197b..8879a9161d8 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -27,6 +27,11 @@ use crate::{
     line_index::OffsetEncoding, lsp_ext::supports_utf8,
 };
 
+// Defines the server-side configuration of the rust-analyzer. We generate
+// *parts* of VS Code's `package.json` config from this.
+//
+// However, editor specific config, which the server doesn't know about, should
+// be specified directly in `package.json`.
 config_data! {
     struct ConfigData {
         /// The strategy to use when inserting new imports or merging imports.
@@ -145,8 +150,6 @@ config_data! {
         inlayHints_parameterHints: bool     = "true",
         /// Whether to show inlay type hints for variables.
         inlayHints_typeHints: bool          = "true",
-        /// Whether inlay hints font size should be smaller than editor's font size.
-        inlayHints_smallerHints: bool       = "true",
 
         /// Whether to show `Debug` lens. Only applies when
         /// `#rust-analyzer.lens.enable#` is set.
diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc
index db3c5f7bbb1..e28423e9932 100644
--- a/docs/user/generated_config.adoc
+++ b/docs/user/generated_config.adoc
@@ -234,11 +234,6 @@ site.
 --
 Whether to show inlay type hints for variables.
 --
-[[rust-analyzer.inlayHints.smallerHints]]rust-analyzer.inlayHints.smallerHints (default: `true`)::
-+
---
-Whether inlay hints font size should be smaller than editor's font size.
---
 [[rust-analyzer.lens.debug]]rust-analyzer.lens.debug (default: `true`)::
 +
 --
diff --git a/editors/code/package.json b/editors/code/package.json
index 35b50e669d3..67e10df7efb 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -283,6 +283,11 @@
                     "default": true,
                     "description": "Whether to show inlay hints."
                 },
+                "rust-analyzer.inlayHints.smallerHints": {
+                    "type": "boolean",
+                    "default": true,
+                    "description": "Whether inlay hints font size should be smaller than editor's font size."
+                },
                 "rust-analyzer.updates.channel": {
                     "type": "string",
                     "enum": [
@@ -353,7 +358,7 @@
                         "Use [MS C++ tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools)"
                     ]
                 },
-                "rust-analyzer.debug.sourceFileMap": {                    
+                "rust-analyzer.debug.sourceFileMap": {
                     "type": ["object", "string"],
                     "const": "auto",
                     "description": "Optional source file mappings passed to the debug engine.",
@@ -654,11 +659,6 @@
                     "default": true,
                     "type": "boolean"
                 },
-                "rust-analyzer.inlayHints.smallerHints": {
-                    "markdownDescription": "Whether inlay hints font size should be smaller than editor's font size.",
-                    "default": true,
-                    "type": "boolean"
-                },
                 "rust-analyzer.lens.debug": {
                     "markdownDescription": "Whether to show `Debug` lens. Only applies when\n`#rust-analyzer.lens.enable#` is set.",
                     "default": true,