Skip to content

Commit

Permalink
internal: ensure that client and server-side configs are not mixed up
Browse files Browse the repository at this point in the history
rust-lang/rust#84647 would help big time here.
  • Loading branch information
matklad committed Apr 28, 2021
1 parent fb45d2a commit 855f072
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
7 changes: 5 additions & 2 deletions crates/rust-analyzer/src/config.rs
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
12 changes: 6 additions & 6 deletions editors/code/package.json
Expand Up @@ -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": [
Expand Down Expand Up @@ -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.",
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 855f072

Please sign in to comment.