From 4ed0fa84145772419e3940aa450cec51f41fa3ba Mon Sep 17 00:00:00 2001 From: Yury Ivanou Date: Sun, 7 May 2023 18:21:07 +0300 Subject: Add config for disabling hover memory layout data --- editors/code/package.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'editors/code/package.json') diff --git a/editors/code/package.json b/editors/code/package.json index ca00da9f361..163a9530308 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -955,7 +955,12 @@ "type": "boolean" }, "rust-analyzer.hover.links.enable": { - "markdownDescription": "Use markdown syntax for links in hover.", + "markdownDescription": "Use markdown syntax for links on hover.", + "default": true, + "type": "boolean" + }, + "rust-analyzer.hover.memory.layout.enable": { + "markdownDescription": "Whether to show memory layout data on hover.", "default": true, "type": "boolean" }, -- cgit 1.4.1-3-g733a5 From 98a4c5049f69cc3ae3081e8541c63c34b13038a3 Mon Sep 17 00:00:00 2001 From: Yury Ivanou Date: Sun, 7 May 2023 18:37:56 +0300 Subject: Rename hover memory layout config key --- crates/rust-analyzer/src/config.rs | 4 ++-- docs/user/generated_config.adoc | 2 +- editors/code/package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'editors/code/package.json') diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index cfb86e8a92a..b72f9202c67 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs @@ -316,7 +316,7 @@ config_data! { /// Use markdown syntax for links on hover. hover_links_enable: bool = "true", /// Whether to show memory layout data on hover. - hover_memory_layout_enable: bool = "true", + hover_memoryLayout_enable: bool = "true", /// Whether to enforce the import granularity setting for all files. If set to false rust-analyzer will try to keep import styles consistent per file. imports_granularity_enforce: bool = "false", @@ -1474,7 +1474,7 @@ impl Config { pub fn hover(&self) -> HoverConfig { HoverConfig { links_in_hover: self.data.hover_links_enable, - memory_layout: self.data.hover_memory_layout_enable, + memory_layout: self.data.hover_memoryLayout_enable, documentation: self.data.hover_documentation_enable, format: { let is_markdown = try_or_def!(self diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc index c46056866b2..e75b97061e0 100644 --- a/docs/user/generated_config.adoc +++ b/docs/user/generated_config.adoc @@ -423,7 +423,7 @@ Whether to show keyword hover popups. Only applies when -- Use markdown syntax for links on hover. -- -[[rust-analyzer.hover.memory.layout.enable]]rust-analyzer.hover.memory.layout.enable (default: `true`):: +[[rust-analyzer.hover.memoryLayout.enable]]rust-analyzer.hover.memoryLayout.enable (default: `true`):: + -- Whether to show memory layout data on hover. diff --git a/editors/code/package.json b/editors/code/package.json index 163a9530308..6d7074be41a 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -959,7 +959,7 @@ "default": true, "type": "boolean" }, - "rust-analyzer.hover.memory.layout.enable": { + "rust-analyzer.hover.memoryLayout.enable": { "markdownDescription": "Whether to show memory layout data on hover.", "default": true, "type": "boolean" -- cgit 1.4.1-3-g733a5