Skip to content

Commit 855f072

Browse files
committed
internal: ensure that client and server-side configs are not mixed up
rust-lang/rust#84647 would help big time here.
1 parent fb45d2a commit 855f072

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

crates/rust-analyzer/src/config.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ use crate::{
2727
line_index::OffsetEncoding, lsp_ext::supports_utf8,
2828
};
2929

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`.
3035
config_data! {
3136
struct ConfigData {
3237
/// The strategy to use when inserting new imports or merging imports.
@@ -145,8 +150,6 @@ config_data! {
145150
inlayHints_parameterHints: bool = "true",
146151
/// Whether to show inlay type hints for variables.
147152
inlayHints_typeHints: bool = "true",
148-
/// Whether inlay hints font size should be smaller than editor's font size.
149-
inlayHints_smallerHints: bool = "true",
150153

151154
/// Whether to show `Debug` lens. Only applies when
152155
/// `#rust-analyzer.lens.enable#` is set.

editors/code/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,11 @@
283283
"default": true,
284284
"description": "Whether to show inlay hints."
285285
},
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+
},
286291
"rust-analyzer.updates.channel": {
287292
"type": "string",
288293
"enum": [
@@ -353,7 +358,7 @@
353358
"Use [MS C++ tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools)"
354359
]
355360
},
356-
"rust-analyzer.debug.sourceFileMap": {
361+
"rust-analyzer.debug.sourceFileMap": {
357362
"type": ["object", "string"],
358363
"const": "auto",
359364
"description": "Optional source file mappings passed to the debug engine.",
@@ -654,11 +659,6 @@
654659
"default": true,
655660
"type": "boolean"
656661
},
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-
},
662662
"rust-analyzer.lens.debug": {
663663
"markdownDescription": "Whether to show `Debug` lens. Only applies when\n`#rust-analyzer.lens.enable#` is set.",
664664
"default": true,

0 commit comments

Comments
 (0)