Skip to content

Commit 3c53f11

Browse files
committed
Remove lens.forceCustomCommands config
1 parent 329adb5 commit 3c53f11

File tree

3 files changed

+19
-38
lines changed

3 files changed

+19
-38
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -655,9 +655,6 @@ config_data! {
655655
lens_debug_enable: bool = true,
656656
/// Whether to show CodeLens in Rust files.
657657
lens_enable: bool = true,
658-
/// Internal config: use custom client-side commands even when the
659-
/// client doesn't set the corresponding capability.
660-
lens_forceCustomCommands: bool = true,
661658
/// Whether to show `Implementations` lens. Only applies when
662659
/// `#rust-analyzer.lens.enable#` is set.
663660
lens_implementations_enable: bool = true,
@@ -2032,7 +2029,7 @@ impl Config {
20322029

20332030
pub fn client_commands(&self) -> ClientCommandsConfig {
20342031
let commands = self.commands();
2035-
let force = commands.is_none() && *self.lens_forceCustomCommands();
2032+
let force = commands.is_none();
20362033
let commands = commands.map(|it| it.commands).unwrap_or_default();
20372034

20382035
let get = |name: &str| commands.iter().any(|it| it == name) || force;

docs/user/generated_config.adoc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -764,12 +764,6 @@ Whether to show `Debug` lens. Only applies when
764764
--
765765
Whether to show CodeLens in Rust files.
766766
--
767-
[[rust-analyzer.lens.forceCustomCommands]]rust-analyzer.lens.forceCustomCommands (default: `true`)::
768-
+
769-
--
770-
Internal config: use custom client-side commands even when the
771-
client doesn't set the corresponding capability.
772-
--
773767
[[rust-analyzer.lens.implementations.enable]]rust-analyzer.lens.implementations.enable (default: `true`)::
774768
+
775769
--

editors/code/package.json

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"engines": {
3030
"vscode": "^1.78.0"
3131
},
32-
"enabledApiProposals": [],
32+
"enabledApiProposals": [ ],
3333
"scripts": {
3434
"vscode:prepublish": "npm run build-base -- --minify",
3535
"package": "vsce package -o rust-analyzer.vsix",
@@ -524,7 +524,7 @@
524524
},
525525
"rust-analyzer.debug.engineSettings": {
526526
"type": "object",
527-
"default": {},
527+
"default": { },
528528
"markdownDescription": "Optional settings passed to the debug engine. Example: `{ \"lldb\": { \"terminal\":\"external\"} }`"
529529
}
530530
}
@@ -763,7 +763,7 @@
763763
"properties": {
764764
"rust-analyzer.cargo.extraArgs": {
765765
"markdownDescription": "Extra arguments that are passed to every cargo invocation.",
766-
"default": [],
766+
"default": [ ],
767767
"type": "array",
768768
"items": {
769769
"type": "string"
@@ -776,7 +776,7 @@
776776
"properties": {
777777
"rust-analyzer.cargo.extraEnv": {
778778
"markdownDescription": "Extra environment variables that will be set when running cargo, rustc\nor other commands within the workspace. Useful for setting RUSTFLAGS.",
779-
"default": {},
779+
"default": { },
780780
"type": "object"
781781
}
782782
}
@@ -786,7 +786,7 @@
786786
"properties": {
787787
"rust-analyzer.cargo.features": {
788788
"markdownDescription": "List of features to activate.\n\nSet this to `\"all\"` to pass `--all-features` to cargo.",
789-
"default": [],
789+
"default": [ ],
790790
"anyOf": [
791791
{
792792
"type": "string",
@@ -924,7 +924,7 @@
924924
"properties": {
925925
"rust-analyzer.check.extraArgs": {
926926
"markdownDescription": "Extra arguments for `cargo check`.",
927-
"default": [],
927+
"default": [ ],
928928
"type": "array",
929929
"items": {
930930
"type": "string"
@@ -937,7 +937,7 @@
937937
"properties": {
938938
"rust-analyzer.check.extraEnv": {
939939
"markdownDescription": "Extra environment variables that will be set when running `cargo check`.\nExtends `#rust-analyzer.cargo.extraEnv#`.",
940-
"default": {},
940+
"default": { },
941941
"type": "object"
942942
}
943943
}
@@ -976,7 +976,7 @@
976976
"properties": {
977977
"rust-analyzer.check.ignore": {
978978
"markdownDescription": "List of `cargo check` (or other command specified in `check.command`) diagnostics to ignore.\n\nFor example for `cargo check`: `dead_code`, `unused_imports`, `unused_variables`,...",
979-
"default": [],
979+
"default": [ ],
980980
"type": "array",
981981
"items": {
982982
"type": "string"
@@ -1243,7 +1243,7 @@
12431243
"properties": {
12441244
"rust-analyzer.diagnostics.disabled": {
12451245
"markdownDescription": "List of rust-analyzer diagnostics to disable.",
1246-
"default": [],
1246+
"default": [ ],
12471247
"type": "array",
12481248
"items": {
12491249
"type": "string"
@@ -1277,7 +1277,7 @@
12771277
"properties": {
12781278
"rust-analyzer.diagnostics.remapPrefix": {
12791279
"markdownDescription": "Map of prefixes to be substituted when parsing diagnostic file paths.\nThis should be the reverse mapping of what is passed to `rustc` as `--remap-path-prefix`.",
1280-
"default": {},
1280+
"default": { },
12811281
"type": "object"
12821282
}
12831283
}
@@ -1297,7 +1297,7 @@
12971297
"properties": {
12981298
"rust-analyzer.diagnostics.warningsAsHint": {
12991299
"markdownDescription": "List of warnings that should be displayed with hint severity.\n\nThe warnings will be indicated by faded text or three dots in code\nand will not show up in the `Problems Panel`.",
1300-
"default": [],
1300+
"default": [ ],
13011301
"type": "array",
13021302
"items": {
13031303
"type": "string"
@@ -1310,7 +1310,7 @@
13101310
"properties": {
13111311
"rust-analyzer.diagnostics.warningsAsInfo": {
13121312
"markdownDescription": "List of warnings that should be displayed with info severity.\n\nThe warnings will be indicated by a blue squiggly underline in code\nand a blue icon in the `Problems Panel`.",
1313-
"default": [],
1313+
"default": [ ],
13141314
"type": "array",
13151315
"items": {
13161316
"type": "string"
@@ -1323,7 +1323,7 @@
13231323
"properties": {
13241324
"rust-analyzer.files.excludeDirs": {
13251325
"markdownDescription": "These directories will be ignored by rust-analyzer. They are\nrelative to the workspace root, and globs are not supported. You may\nalso need to add the folders to Code's `files.watcherExclude`.",
1326-
"default": [],
1326+
"default": [ ],
13271327
"type": "array",
13281328
"items": {
13291329
"type": "string"
@@ -2138,16 +2138,6 @@
21382138
}
21392139
}
21402140
},
2141-
{
2142-
"title": "lens",
2143-
"properties": {
2144-
"rust-analyzer.lens.forceCustomCommands": {
2145-
"markdownDescription": "Internal config: use custom client-side commands even when the\nclient doesn't set the corresponding capability.",
2146-
"default": true,
2147-
"type": "boolean"
2148-
}
2149-
}
2150-
},
21512141
{
21522142
"title": "lens",
21532143
"properties": {
@@ -2231,7 +2221,7 @@
22312221
"properties": {
22322222
"rust-analyzer.linkedProjects": {
22332223
"markdownDescription": "Disable project auto-discovery in favor of explicitly specified set\nof projects.\n\nElements must be paths pointing to `Cargo.toml`,\n`rust-project.json`, `.rs` files (which will be treated as standalone files) or JSON\nobjects in `rust-project.json` format.",
2234-
"default": [],
2224+
"default": [ ],
22352225
"type": "array",
22362226
"items": {
22372227
"type": [
@@ -2262,7 +2252,7 @@
22622252
"properties": {
22632253
"rust-analyzer.lru.query.capacities": {
22642254
"markdownDescription": "Sets the LRU capacity of the specified queries.",
2265-
"default": {},
2255+
"default": { },
22662256
"type": "object"
22672257
}
22682258
}
@@ -2342,7 +2332,7 @@
23422332
"properties": {
23432333
"rust-analyzer.procMacro.ignored": {
23442334
"markdownDescription": "These proc-macros will be ignored when trying to expand them.\n\nThis config takes a map of crate names with the exported proc-macro names to ignore as values.",
2345-
"default": {},
2335+
"default": { },
23462336
"type": "object"
23472337
}
23482338
}
@@ -2398,7 +2388,7 @@
23982388
"properties": {
23992389
"rust-analyzer.runnables.extraArgs": {
24002390
"markdownDescription": "Additional arguments to be passed to cargo for runnables such as\ntests or binaries. For example, it may be `--release`.",
2401-
"default": [],
2391+
"default": [ ],
24022392
"type": "array",
24032393
"items": {
24042394
"type": "string"
@@ -2439,7 +2429,7 @@
24392429
"properties": {
24402430
"rust-analyzer.rustfmt.extraArgs": {
24412431
"markdownDescription": "Additional arguments to `rustfmt`.",
2442-
"default": [],
2432+
"default": [ ],
24432433
"type": "array",
24442434
"items": {
24452435
"type": "string"

0 commit comments

Comments
 (0)