From 7797c59f183e195aa67970a830b8ff83a2ae9b70 Mon Sep 17 00:00:00 2001 From: Kevin DeLorey Date: Thu, 22 Jul 2021 19:04:27 -0600 Subject: [PATCH] Updated docs. --- crates/rust-analyzer/src/config.rs | 17 +++++++------ docs/user/generated_config.adoc | 20 +++++++++++++++ editors/code/package.json | 40 +++++++++++++++--------------- 3 files changed, 49 insertions(+), 28 deletions(-) diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index 4b403300fe..a4caccbe63 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs @@ -147,6 +147,15 @@ config_data! { /// also need to add the folders to Code's `files.watcherExclude`. files_excludeDirs: Vec = "[]", + /// Enables highlighting of related references while hovering your mouse above any identifier. + highlightRelated_references: bool = "true", + /// Enables highlighting of all exit points while hovering your mouse above any `return`, `?`, or return type arrow (`->`). + highlightRelated_exitPoints: bool = "true", + /// Enables highlighting of related references while hovering your mouse `break`, `loop`, `while`, or `for` keywords. + highlightRelated_breakPoints: bool = "true", + /// Enables highlighting of all break points for a loop or block context while hovering your mouse above any `async` or `await` keywords. + highlightRelated_yieldPoints: bool = "true", + /// Use semantic tokens for strings. /// /// In some editors (e.g. vscode) semantic tokens override other highlighting grammars. @@ -261,14 +270,6 @@ config_data! { workspace_symbol_search_scope: WorskpaceSymbolSearchScopeDef = "\"workspace\"", /// Workspace symbol search kind. workspace_symbol_search_kind: WorskpaceSymbolSearchKindDef = "\"only_types\"", - - highlightRelated_references: bool = "true", - - highlightRelated_exitPoints: bool = "true", - - highlightRelated_breakPoints: bool = "true", - - highlightRelated_yieldPoints: bool = "true", } } diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc index 675e57386e..54328f5135 100644 --- a/docs/user/generated_config.adoc +++ b/docs/user/generated_config.adoc @@ -208,6 +208,26 @@ These directories will be ignored by rust-analyzer. They are relative to the workspace root, and globs are not supported. You may also need to add the folders to Code's `files.watcherExclude`. -- +[[rust-analyzer.highlightRelated.references]]rust-analyzer.highlightRelated.references (default: `true`):: ++ +-- +Enables highlighting of related references while hovering your mouse above any identifier. +-- +[[rust-analyzer.highlightRelated.exitPoints]]rust-analyzer.highlightRelated.exitPoints (default: `true`):: ++ +-- +Enables highlighting of all exit points while hovering your mouse above any `return`, `?`, or return type arrow (`->`). +-- +[[rust-analyzer.highlightRelated.breakPoints]]rust-analyzer.highlightRelated.breakPoints (default: `true`):: ++ +-- +Enables highlighting of related references while hovering your mouse `break`, `loop`, `while`, or `for` keywords. +-- +[[rust-analyzer.highlightRelated.yieldPoints]]rust-analyzer.highlightRelated.yieldPoints (default: `true`):: ++ +-- +Enables highlighting of all break points for a loop or block context while hovering your mouse above any `async` or `await` keywords. +-- [[rust-analyzer.highlighting.strings]]rust-analyzer.highlighting.strings (default: `true`):: + -- diff --git a/editors/code/package.json b/editors/code/package.json index 0f46062f27..3a6f2c5fe9 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -655,6 +655,26 @@ "type": "string" } }, + "rust-analyzer.highlightRelated.references": { + "markdownDescription": "Enables highlighting of related references while hovering your mouse above any identifier.", + "default": true, + "type": "boolean" + }, + "rust-analyzer.highlightRelated.exitPoints": { + "markdownDescription": "Enables highlighting of all exit points while hovering your mouse above any `return`, `?`, or return type arrow (`->`).", + "default": true, + "type": "boolean" + }, + "rust-analyzer.highlightRelated.breakPoints": { + "markdownDescription": "Enables highlighting of related references while hovering your mouse `break`, `loop`, `while`, or `for` keywords.", + "default": true, + "type": "boolean" + }, + "rust-analyzer.highlightRelated.yieldPoints": { + "markdownDescription": "Enables highlighting of all break points for a loop or block context while hovering your mouse above any `async` or `await` keywords.", + "default": true, + "type": "boolean" + }, "rust-analyzer.highlighting.strings": { "markdownDescription": "Use semantic tokens for strings.\n\nIn some editors (e.g. vscode) semantic tokens override other highlighting grammars.\nBy disabling semantic tokens for strings, other grammars can be used to highlight\ntheir contents.", "default": true, @@ -881,26 +901,6 @@ "Search for all symbols kinds" ] }, - "rust-analyzer.highlightRelated.references": { - "markdownDescription": "Enables highlighting of related references while hovering your mouse above any identifier.", - "default": true, - "type": "boolean" - }, - "rust-analyzer.highlightRelated.exitPoints": { - "markdownDescription": "Enables highlighting of all exit points while hovering your mouse above any `return`, `?`, or return type arrow (`->`).", - "default": true, - "type": "boolean" - }, - "rust-analyzer.highlightRelated.breakPoints": { - "markdownDescription": "Enables highlighting of related references while hovering your mouse `break`, `loop`, `while`, or `for` keywords.", - "default": true, - "type": "boolean" - }, - "rust-analyzer.highlightRelated.yieldPoints": { - "markdownDescription": "Enables highlighting of all break points for a loop or block context while hovering your mouse above any `async` or `await` keywords.", - "default": true, - "type": "boolean" - }, "$generated-end": {} } },