From 29729abc3c9736ca70bc0828e36e6670fb36b5bc Mon Sep 17 00:00:00 2001 From: Stanislav Date: Sun, 4 Sep 2022 19:10:04 +0300 Subject: [PATCH 01/12] Retain imports on find-all-references --- crates/ide/src/references.rs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs index 99614b645e48..fad44930fec2 100644 --- a/crates/ide/src/references.rs +++ b/crates/ide/src/references.rs @@ -79,6 +79,8 @@ pub(crate) fn find_all_refs( retain_adt_literal_usages(&mut usages, def, sema); } + retain_import_usages(&mut usages, sema); + let references = usages .into_iter() .map(|(file_id, refs)| { @@ -112,6 +114,32 @@ pub(crate) fn find_all_refs( } } +fn retain_import_usages(usages: &mut UsageSearchResult, sema: &Semantics<'_, RootDatabase>) { + for (file_id, refs) in &mut usages.references { + refs.retain(|x| { + let file_sema = sema.parse(file_id.clone()).syntax().clone(); + + let maybe_node = file_sema.child_or_token_at_range(x.range.clone()); + + if let Some(node) = maybe_node { + let res = match node { + syntax::NodeOrToken::Node(x) => { + if matches!(x.kind(), USE) { + false + } else { + true + } + } + syntax::NodeOrToken::Token(_) => true, + }; + res + } else { + true + } + }); + } +} + pub(crate) fn find_defs<'a>( sema: &'a Semantics<'_, RootDatabase>, syntax: &SyntaxNode, From ba40aa72ac1e2d5ddd1f0732e27a84b87692ccae Mon Sep 17 00:00:00 2001 From: Stanislav Date: Sun, 4 Sep 2022 19:41:06 +0300 Subject: [PATCH 02/12] Update crates/ide/src/references.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Laurențiu Nicola --- crates/ide/src/references.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs index fad44930fec2..021596618ddd 100644 --- a/crates/ide/src/references.rs +++ b/crates/ide/src/references.rs @@ -123,7 +123,7 @@ fn retain_import_usages(usages: &mut UsageSearchResult, sema: &Semantics<'_, Roo if let Some(node) = maybe_node { let res = match node { - syntax::NodeOrToken::Node(x) => { + syntax::NodeOrToken::Node(x) => !matches!(x.kind(), USE), if matches!(x.kind(), USE) { false } else { From 6001e7dfb191f68332e2daf2eec692bbc2ae244f Mon Sep 17 00:00:00 2001 From: Stanislav Date: Sun, 4 Sep 2022 19:45:50 +0300 Subject: [PATCH 03/12] fix --- crates/ide/src/references.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs index 021596618ddd..53a7a3a21730 100644 --- a/crates/ide/src/references.rs +++ b/crates/ide/src/references.rs @@ -124,12 +124,6 @@ fn retain_import_usages(usages: &mut UsageSearchResult, sema: &Semantics<'_, Roo if let Some(node) = maybe_node { let res = match node { syntax::NodeOrToken::Node(x) => !matches!(x.kind(), USE), - if matches!(x.kind(), USE) { - false - } else { - true - } - } syntax::NodeOrToken::Token(_) => true, }; res From bd0eeb3f041cc57dad3ac40ed6cfcc08f1055638 Mon Sep 17 00:00:00 2001 From: Stanislav Date: Wed, 7 Sep 2022 03:01:06 +0300 Subject: [PATCH 04/12] Update crates/ide/src/references.rs Co-authored-by: Lukas Wirth --- crates/ide/src/references.rs | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs index 53a7a3a21730..d4c431f75f70 100644 --- a/crates/ide/src/references.rs +++ b/crates/ide/src/references.rs @@ -116,19 +116,10 @@ pub(crate) fn find_all_refs( fn retain_import_usages(usages: &mut UsageSearchResult, sema: &Semantics<'_, RootDatabase>) { for (file_id, refs) in &mut usages.references { - refs.retain(|x| { - let file_sema = sema.parse(file_id.clone()).syntax().clone(); - - let maybe_node = file_sema.child_or_token_at_range(x.range.clone()); - - if let Some(node) = maybe_node { - let res = match node { - syntax::NodeOrToken::Node(x) => !matches!(x.kind(), USE), - syntax::NodeOrToken::Token(_) => true, - }; - res - } else { - true + refs.retain(|it| { + match if.name.as_name_ref() { + Some(name_ref) => name_ref.syntax().ancestors().any(|it| !matches(it.kind(), USE)), + None => true, } }); } From 92d54f9b304092f20645d8ef0d54d7b724810428 Mon Sep 17 00:00:00 2001 From: Stanislav Date: Wed, 7 Sep 2022 03:23:21 +0300 Subject: [PATCH 05/12] typo and draft --- crates/ide/src/references.rs | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs index d4c431f75f70..e495bfee5567 100644 --- a/crates/ide/src/references.rs +++ b/crates/ide/src/references.rs @@ -115,12 +115,32 @@ pub(crate) fn find_all_refs( } fn retain_import_usages(usages: &mut UsageSearchResult, sema: &Semantics<'_, RootDatabase>) { - for (file_id, refs) in &mut usages.references { + // todo use this https://github.com/rust-lang/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs#L432 + + for (_file_id, refs) in &mut usages.references { refs.retain(|it| { - match if.name.as_name_ref() { - Some(name_ref) => name_ref.syntax().ancestors().any(|it| !matches(it.kind(), USE)), + match it.name.as_name_ref() { + Some(name_ref) => name_ref.syntax().ancestors().any(|it_ref| { + dbg!(&it_ref); + !matches!(it_ref.kind(), USE) + }), None => true, } + + // this works: + // let file_sema = sema.parse(file_id.clone()).syntax().clone(); + + // let maybe_node = file_sema.child_or_token_at_range(it.range.clone()); + + // if let Some(node) = maybe_node { + // let res = match node { + // syntax::NodeOrToken::Node(x) => !matches!(x.kind(), USE), + // syntax::NodeOrToken::Token(_) => true, + // }; + // res + // } else { + // true + // } }); } } From eba54c2fc9c15ec6480385486b7f711a7f2ca39e Mon Sep 17 00:00:00 2001 From: Stanislav Date: Wed, 7 Sep 2022 04:09:25 +0300 Subject: [PATCH 06/12] pretty solition works --- crates/ide/src/references.rs | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs index e495bfee5567..6c8ae812c97c 100644 --- a/crates/ide/src/references.rs +++ b/crates/ide/src/references.rs @@ -79,7 +79,7 @@ pub(crate) fn find_all_refs( retain_adt_literal_usages(&mut usages, def, sema); } - retain_import_usages(&mut usages, sema); + retain_import_usages(&mut usages); let references = usages .into_iter() @@ -114,33 +114,15 @@ pub(crate) fn find_all_refs( } } -fn retain_import_usages(usages: &mut UsageSearchResult, sema: &Semantics<'_, RootDatabase>) { +fn retain_import_usages(usages: &mut UsageSearchResult) { // todo use this https://github.com/rust-lang/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs#L432 for (_file_id, refs) in &mut usages.references { - refs.retain(|it| { - match it.name.as_name_ref() { - Some(name_ref) => name_ref.syntax().ancestors().any(|it_ref| { - dbg!(&it_ref); - !matches!(it_ref.kind(), USE) - }), - None => true, + refs.retain(|it| match it.name.as_name_ref() { + Some(name_ref) => { + !name_ref.syntax().ancestors().any(|it_ref| matches!(it_ref.kind(), USE)) } - - // this works: - // let file_sema = sema.parse(file_id.clone()).syntax().clone(); - - // let maybe_node = file_sema.child_or_token_at_range(it.range.clone()); - - // if let Some(node) = maybe_node { - // let res = match node { - // syntax::NodeOrToken::Node(x) => !matches!(x.kind(), USE), - // syntax::NodeOrToken::Token(_) => true, - // }; - // res - // } else { - // true - // } + None => true, }); } } From 9f6553e1d66130325a61bfc412b4ea8335f8a28a Mon Sep 17 00:00:00 2001 From: Stanislav Date: Thu, 8 Sep 2022 01:53:20 +0300 Subject: [PATCH 07/12] add config for import filtering --- crates/ide/src/annotations.rs | 1 + crates/ide/src/lib.rs | 5 ++++- crates/ide/src/references.rs | 9 ++++++--- crates/rust-analyzer/src/config.rs | 7 +++++++ crates/rust-analyzer/src/handlers.rs | 8 ++++++-- editors/code/package.json | 5 +++++ 6 files changed, 29 insertions(+), 6 deletions(-) diff --git a/crates/ide/src/annotations.rs b/crates/ide/src/annotations.rs index 210c5c7facd2..ba4c330bf3d5 100644 --- a/crates/ide/src/annotations.rs +++ b/crates/ide/src/annotations.rs @@ -158,6 +158,7 @@ pub(crate) fn resolve_annotation(db: &RootDatabase, mut annotation: Annotation) &Semantics::new(db), FilePosition { file_id, offset: annotation.range.start() }, None, + false, ) .map(|result| { result diff --git a/crates/ide/src/lib.rs b/crates/ide/src/lib.rs index d61d69a090b3..5ad922ddbc27 100644 --- a/crates/ide/src/lib.rs +++ b/crates/ide/src/lib.rs @@ -425,8 +425,11 @@ impl Analysis { &self, position: FilePosition, search_scope: Option, + exclude_imports: bool, ) -> Cancellable>> { - self.with_db(|db| references::find_all_refs(&Semantics::new(db), position, search_scope)) + self.with_db(|db| { + references::find_all_refs(&Semantics::new(db), position, search_scope, exclude_imports) + }) } /// Finds all methods and free functions for the file. Does not return tests! diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs index 6c8ae812c97c..73d118d8bb20 100644 --- a/crates/ide/src/references.rs +++ b/crates/ide/src/references.rs @@ -54,6 +54,7 @@ pub(crate) fn find_all_refs( sema: &Semantics<'_, RootDatabase>, position: FilePosition, search_scope: Option, + exclude_imports: bool, ) -> Option> { let _p = profile::span("find_all_refs"); let syntax = sema.parse(position.file_id).syntax().clone(); @@ -79,7 +80,9 @@ pub(crate) fn find_all_refs( retain_adt_literal_usages(&mut usages, def, sema); } - retain_import_usages(&mut usages); + if exclude_imports { + filter_import_references(&mut usages); + } let references = usages .into_iter() @@ -114,7 +117,7 @@ pub(crate) fn find_all_refs( } } -fn retain_import_usages(usages: &mut UsageSearchResult) { +fn filter_import_references(usages: &mut UsageSearchResult) { // todo use this https://github.com/rust-lang/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs#L432 for (_file_id, refs) in &mut usages.references { @@ -1109,7 +1112,7 @@ impl Foo { fn check_with_scope(ra_fixture: &str, search_scope: Option, expect: Expect) { let (analysis, pos) = fixture::position(ra_fixture); - let refs = analysis.find_all_refs(pos, search_scope).unwrap().unwrap(); + let refs = analysis.find_all_refs(pos, search_scope, false).unwrap().unwrap(); let mut actual = String::new(); for refs in refs { diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index 54dcb42d99c7..2fdede40dde8 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs @@ -220,6 +220,9 @@ config_data! { /// Controls file watching implementation. files_watcher: FilesWatcherDef = "\"client\"", + /// Exclude imports in "Find All References" + findAllRefs_excludeImports: bool = "false", + /// Enables highlighting of related references while the cursor is on `break`, `loop`, `while`, or `for` keywords. highlightRelated_breakPoints_enable: bool = "true", /// Enables highlighting of all exit points while the cursor is on any `return`, `?`, `fn`, or return type arrow (`->`). @@ -1147,6 +1150,10 @@ impl Config { } } + pub fn find_all_refs_exclude_imports(&self) -> bool { + self.data.findAllRefs_excludeImports + } + pub fn snippet_cap(&self) -> bool { self.experimental("snippetTextEdit") } diff --git a/crates/rust-analyzer/src/handlers.rs b/crates/rust-analyzer/src/handlers.rs index d9b669afbe81..70dc37e0c6bf 100644 --- a/crates/rust-analyzer/src/handlers.rs +++ b/crates/rust-analyzer/src/handlers.rs @@ -1012,7 +1012,9 @@ pub(crate) fn handle_references( let _p = profile::span("handle_references"); let position = from_proto::file_position(&snap, params.text_document_position)?; - let refs = match snap.analysis.find_all_refs(position, None)? { + let exclude_imports = snap.config.find_all_refs_exclude_imports(); + + let refs = match snap.analysis.find_all_refs(position, None, exclude_imports)? { None => return Ok(None), Some(refs) => refs, }; @@ -1652,7 +1654,9 @@ fn show_ref_command_link( position: &FilePosition, ) -> Option { if snap.config.hover_actions().references && snap.config.client_commands().show_reference { - if let Some(ref_search_res) = snap.analysis.find_all_refs(*position, None).unwrap_or(None) { + if let Some(ref_search_res) = + snap.analysis.find_all_refs(*position, None, false).unwrap_or(None) + { let uri = to_proto::url(snap, position.file_id); let line_index = snap.file_line_index(position.file_id).ok()?; let position = to_proto::position(&line_index, position.offset); diff --git a/editors/code/package.json b/editors/code/package.json index 767c5875bf7e..3af18dacd495 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -839,6 +839,11 @@ "type": "integer", "minimum": 0 }, + "rust-analyzer.findAllRefs.excludeImports": { + "markdownDescription": "Exclude imports from Find All References results", + "default": false, + "type": "boolean" + }, "rust-analyzer.inlayHints.closureReturnTypeHints.enable": { "markdownDescription": "Whether to show inlay type hints for return types of closures.", "default": "never", From 1764c425186142e4078e4dc1774321871f6f2eee Mon Sep 17 00:00:00 2001 From: Stanislav Date: Thu, 8 Sep 2022 22:36:36 +0300 Subject: [PATCH 08/12] fix comment --- crates/rust-analyzer/src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index 2fdede40dde8..48a20189cc4c 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs @@ -220,7 +220,7 @@ config_data! { /// Controls file watching implementation. files_watcher: FilesWatcherDef = "\"client\"", - /// Exclude imports in "Find All References" + /// Exclude imports in `Find All References` findAllRefs_excludeImports: bool = "false", /// Enables highlighting of related references while the cursor is on `break`, `loop`, `while`, or `for` keywords. From 0240294759379bc6807d2f1b87391075c84f6bf3 Mon Sep 17 00:00:00 2001 From: Stanislav Date: Thu, 8 Sep 2022 22:47:39 +0300 Subject: [PATCH 09/12] fix comment round 2 --- crates/rust-analyzer/src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index 48a20189cc4c..80a4b709e7cd 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs @@ -220,7 +220,7 @@ config_data! { /// Controls file watching implementation. files_watcher: FilesWatcherDef = "\"client\"", - /// Exclude imports in `Find All References` + /// Exclude imports from find-all-references. findAllRefs_excludeImports: bool = "false", /// Enables highlighting of related references while the cursor is on `break`, `loop`, `while`, or `for` keywords. From ab0b64b26c95bd0cf60af2c299f35c6860c34431 Mon Sep 17 00:00:00 2001 From: Stanislav Date: Thu, 8 Sep 2022 22:55:04 +0300 Subject: [PATCH 10/12] fix comment round 3 --- docs/user/generated_config.adoc | 5 +++++ editors/code/package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc index 72b925726479..517a73edd33f 100644 --- a/docs/user/generated_config.adoc +++ b/docs/user/generated_config.adoc @@ -260,6 +260,11 @@ also need to add the folders to Code's `files.watcherExclude`. [[rust-analyzer.files.watcher]]rust-analyzer.files.watcher (default: `"client"`):: + -- +Find All References config. +-- +[[rust-analyzer.findAllRefs.excludeImports]]rust-analyzer.findAllRefs.excludeImports (default: `false`):: ++ +-- Controls file watching implementation. -- [[rust-analyzer.highlightRelated.breakPoints.enable]]rust-analyzer.highlightRelated.breakPoints.enable (default: `true`):: diff --git a/editors/code/package.json b/editors/code/package.json index 3af18dacd495..189f20fc0cd9 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -840,7 +840,7 @@ "minimum": 0 }, "rust-analyzer.findAllRefs.excludeImports": { - "markdownDescription": "Exclude imports from Find All References results", + "markdownDescription": "Exclude imports from find-all-references.", "default": false, "type": "boolean" }, From 773f9b38e39033576201a7901bb4b321871e8cb5 Mon Sep 17 00:00:00 2001 From: Stanislav Date: Fri, 9 Sep 2022 01:19:34 +0300 Subject: [PATCH 11/12] fix. round 4 --- docs/user/generated_config.adoc | 4 ++-- editors/code/package.json | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc index 517a73edd33f..337629e17fd9 100644 --- a/docs/user/generated_config.adoc +++ b/docs/user/generated_config.adoc @@ -260,12 +260,12 @@ also need to add the folders to Code's `files.watcherExclude`. [[rust-analyzer.files.watcher]]rust-analyzer.files.watcher (default: `"client"`):: + -- -Find All References config. +Controls file watching implementation. -- [[rust-analyzer.findAllRefs.excludeImports]]rust-analyzer.findAllRefs.excludeImports (default: `false`):: + -- -Controls file watching implementation. +Exclude imports from find-all-references. -- [[rust-analyzer.highlightRelated.breakPoints.enable]]rust-analyzer.highlightRelated.breakPoints.enable (default: `true`):: + diff --git a/editors/code/package.json b/editors/code/package.json index 189f20fc0cd9..07e9a08e1bd7 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -706,6 +706,11 @@ "Use server-side file watching" ] }, + "rust-analyzer.findAllRefs.excludeImports": { + "markdownDescription": "Exclude imports from find-all-references.", + "default": false, + "type": "boolean" + }, "rust-analyzer.highlightRelated.breakPoints.enable": { "markdownDescription": "Enables highlighting of related references while the cursor is on `break`, `loop`, `while`, or `for` keywords.", "default": true, @@ -839,11 +844,6 @@ "type": "integer", "minimum": 0 }, - "rust-analyzer.findAllRefs.excludeImports": { - "markdownDescription": "Exclude imports from find-all-references.", - "default": false, - "type": "boolean" - }, "rust-analyzer.inlayHints.closureReturnTypeHints.enable": { "markdownDescription": "Whether to show inlay type hints for return types of closures.", "default": "never", From f7f4792f4f4492e62a9439bdf214acee797e0341 Mon Sep 17 00:00:00 2001 From: Stanislav Date: Fri, 9 Sep 2022 20:58:06 +0300 Subject: [PATCH 12/12] fixes --- crates/ide/src/references.rs | 2 -- crates/rust-analyzer/src/config.rs | 9 ++++----- docs/user/generated_config.adoc | 10 +++++----- editors/code/package.json | 10 +++++----- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs index 73d118d8bb20..5b410c454d9d 100644 --- a/crates/ide/src/references.rs +++ b/crates/ide/src/references.rs @@ -118,8 +118,6 @@ pub(crate) fn find_all_refs( } fn filter_import_references(usages: &mut UsageSearchResult) { - // todo use this https://github.com/rust-lang/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs#L432 - for (_file_id, refs) in &mut usages.references { refs.retain(|it| match it.name.as_name_ref() { Some(name_ref) => { diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index 80a4b709e7cd..835eeb144a6a 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs @@ -219,10 +219,6 @@ config_data! { files_excludeDirs: Vec = "[]", /// Controls file watching implementation. files_watcher: FilesWatcherDef = "\"client\"", - - /// Exclude imports from find-all-references. - findAllRefs_excludeImports: bool = "false", - /// Enables highlighting of related references while the cursor is on `break`, `loop`, `while`, or `for` keywords. highlightRelated_breakPoints_enable: bool = "true", /// Enables highlighting of all exit points while the cursor is on any `return`, `?`, `fn`, or return type arrow (`->`). @@ -362,6 +358,9 @@ config_data! { /// this is rust-analyzer itself, but we override this in tests). procMacro_server: Option = "null", + /// Exclude imports from find-all-references. + references_excludeImports: bool = "false", + /// Command to be executed instead of 'cargo' for runnables. runnables_command: Option = "null", /// Additional arguments to be passed to cargo for runnables such as @@ -1151,7 +1150,7 @@ impl Config { } pub fn find_all_refs_exclude_imports(&self) -> bool { - self.data.findAllRefs_excludeImports + self.data.references_excludeImports } pub fn snippet_cap(&self) -> bool { diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc index 337629e17fd9..0e301e5d67d4 100644 --- a/docs/user/generated_config.adoc +++ b/docs/user/generated_config.adoc @@ -262,11 +262,6 @@ also need to add the folders to Code's `files.watcherExclude`. -- Controls file watching implementation. -- -[[rust-analyzer.findAllRefs.excludeImports]]rust-analyzer.findAllRefs.excludeImports (default: `false`):: -+ --- -Exclude imports from find-all-references. --- [[rust-analyzer.highlightRelated.breakPoints.enable]]rust-analyzer.highlightRelated.breakPoints.enable (default: `true`):: + -- @@ -551,6 +546,11 @@ This config takes a map of crate names with the exported proc-macro names to ign Internal config, path to proc-macro server executable (typically, this is rust-analyzer itself, but we override this in tests). -- +[[rust-analyzer.references.excludeImports]]rust-analyzer.references.excludeImports (default: `false`):: ++ +-- +Exclude imports from find-all-references. +-- [[rust-analyzer.runnables.command]]rust-analyzer.runnables.command (default: `null`):: + -- diff --git a/editors/code/package.json b/editors/code/package.json index 07e9a08e1bd7..9d39c7c296bb 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -706,11 +706,6 @@ "Use server-side file watching" ] }, - "rust-analyzer.findAllRefs.excludeImports": { - "markdownDescription": "Exclude imports from find-all-references.", - "default": false, - "type": "boolean" - }, "rust-analyzer.highlightRelated.breakPoints.enable": { "markdownDescription": "Enables highlighting of related references while the cursor is on `break`, `loop`, `while`, or `for` keywords.", "default": true, @@ -1041,6 +1036,11 @@ "string" ] }, + "rust-analyzer.references.excludeImports": { + "markdownDescription": "Exclude imports from find-all-references.", + "default": false, + "type": "boolean" + }, "rust-analyzer.runnables.command": { "markdownDescription": "Command to be executed instead of 'cargo' for runnables.", "default": null,