mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
Auto merge of #17675 - PaulDotSH:remove-lens-force-custom-commands-config, r=lnicola
Remove lens.forceCustomCommands config Closes https://github.com/rust-lang/rust-analyzer/issues/17643 A very simple PR that removes the lens.forceCustomCommands config feature without side effects.
This commit is contained in:
commit
b2e3cec51e
3 changed files with 2 additions and 23 deletions
|
@ -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"),
|
||||
|
|
|
@ -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`)::
|
||||
+
|
||||
--
|
||||
|
|
|
@ -2138,16 +2138,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": {
|
||||
|
|
Loading…
Reference in a new issue