diff options
| author | PaulDotSH <84643540+PaulDotSH@users.noreply.github.com> | 2024-07-23 03:27:28 -0400 |
|---|---|---|
| committer | PaulDotSH <84643540+PaulDotSH@users.noreply.github.com> | 2024-07-23 03:27:28 -0400 |
| commit | fdbd9bee574746f4a3d9a2be31f332c9a8a38a62 (patch) | |
| tree | bb4f8d003c17de57990aa64f14d9c8b2fb16fbd7 | |
| parent | 28b8c2443bdbe206b65df5a69923a918c2e6b9f6 (diff) | |
| download | rust-fdbd9bee574746f4a3d9a2be31f332c9a8a38a62.tar.gz rust-fdbd9bee574746f4a3d9a2be31f332c9a8a38a62.zip | |
Remove lens.forceCustomCommands config
| -rw-r--r-- | src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs | 9 | ||||
| -rw-r--r-- | src/tools/rust-analyzer/docs/user/generated_config.adoc | 6 | ||||
| -rw-r--r-- | src/tools/rust-analyzer/editors/code/package.json | 10 |
3 files changed, 2 insertions, 23 deletions
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs index e71ad9da957..59051379678 100644 --- a/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs +++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs @@ -655,9 +655,6 @@ config_data! { lens_debug_enable: bool = true, /// Whether to show CodeLens in Rust files. lens_enable: bool = true, - /// Internal config: use custom client-side commands even when the - /// client doesn't set the corresponding capability. - lens_forceCustomCommands: bool = true, /// Whether to show `Implementations` lens. Only applies when /// `#rust-analyzer.lens.enable#` is set. lens_implementations_enable: bool = true, @@ -2031,11 +2028,9 @@ impl Config { } pub fn client_commands(&self) -> ClientCommandsConfig { - let commands = self.commands(); - let force = commands.is_none() && *self.lens_forceCustomCommands(); - let commands = commands.map(|it| it.commands).unwrap_or_default(); + let commands = self.commands().map(|it| it.commands).unwrap_or_default(); - let get = |name: &str| commands.iter().any(|it| it == name) || force; + let get = |name: &str| commands.iter().any(|it| it == name); ClientCommandsConfig { run_single: get("rust-analyzer.runSingle"), diff --git a/src/tools/rust-analyzer/docs/user/generated_config.adoc b/src/tools/rust-analyzer/docs/user/generated_config.adoc index cb876e85366..542c539bde4 100644 --- a/src/tools/rust-analyzer/docs/user/generated_config.adoc +++ b/src/tools/rust-analyzer/docs/user/generated_config.adoc @@ -764,12 +764,6 @@ Whether to show `Debug` lens. Only applies when -- Whether to show CodeLens in Rust files. -- -[[rust-analyzer.lens.forceCustomCommands]]rust-analyzer.lens.forceCustomCommands (default: `true`):: -+ --- -Internal config: use custom client-side commands even when the -client doesn't set the corresponding capability. --- [[rust-analyzer.lens.implementations.enable]]rust-analyzer.lens.implementations.enable (default: `true`):: + -- diff --git a/src/tools/rust-analyzer/editors/code/package.json b/src/tools/rust-analyzer/editors/code/package.json index 575033a5886..eee4fe3706d 100644 --- a/src/tools/rust-analyzer/editors/code/package.json +++ b/src/tools/rust-analyzer/editors/code/package.json @@ -2141,16 +2141,6 @@ { "title": "lens", "properties": { - "rust-analyzer.lens.forceCustomCommands": { - "markdownDescription": "Internal config: use custom client-side commands even when the\nclient doesn't set the corresponding capability.", - "default": true, - "type": "boolean" - } - } - }, - { - "title": "lens", - "properties": { "rust-analyzer.lens.implementations.enable": { "markdownDescription": "Whether to show `Implementations` lens. Only applies when\n`#rust-analyzer.lens.enable#` is set.", "default": true, |
