rust-analyzer/crates/ide-db/src
bors e4146af294 Auto merge of #16441 - Young-Flash:exclude_tests_refs, r=Veykril
feat: enable excluding refs search results in test

## Change

Here I introduce a new `ReferenceCategory::Test` type to indicate whether the function where this reference is located is marked as `#[test]`, and expose an config item (`rust-analyzer.references.excludeTests`) to client.

I also changed the signature of `ReferenceCategory::new`, adding a `sema: &Semantics<'_, RootDatabase>` param to do some hir analysis. Hope the current implementation is good to go.

## Demo

`"rust-analyzer.references.excludeTests": false`

![include](https://github.com/rust-lang/rust-analyzer/assets/71162630/9f1176d4-7b41-4f49-ac79-55d25a42d5d1)

`"rust-analyzer.references.excludeTests": true`

![exclude](https://github.com/rust-lang/rust-analyzer/assets/71162630/2938b44b-9e5b-48de-a049-453f5bbc09d0)

close https://github.com/rust-lang/rust-analyzer/issues/14530
2024-01-31 07:53:28 +00:00
..
generated internal: re-generate lints.rs 2024-01-15 12:24:47 +01:00
imports internal: switch to tracing from log 2024-01-30 12:27:31 -05:00
syntax_helpers Emit builtin#format_args in builtin format_args expander 2023-09-06 18:08:20 +02:00
test_data Make functions in impl have a container name 2023-12-17 13:44:47 -05:00
tests feat: generate descriptors for all unstable features 2023-10-09 09:36:47 +02:00
active_parameter.rs nonminimal_bool 2024-01-19 17:31:01 +01:00
apply_change.rs internal: switch to tracing from log 2024-01-30 12:27:31 -05:00
assists.rs Merge commit 'aa9bc8612514d216f84eec218dfd19ab83f3598a' into sync-from-ra 2023-06-05 12:04:23 +03:00
defs.rs internal: switch to tracing from log 2024-01-30 12:27:31 -05:00
documentation.rs Don't trim trailing whitespace from doc comments 2023-12-10 20:54:22 +00:00
famous_defs.rs make generate_mut_trait_impl assist trigged for std trait only 2023-11-05 12:27:10 +08:00
helpers.rs internal: switch to tracing from log 2024-01-30 12:27:31 -05:00
items_locator.rs internal: switch to tracing from log 2024-01-30 12:27:31 -05:00
label.rs style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
lib.rs Re-order mod declarations 2024-01-27 11:02:34 +01:00
path_transform.rs cargo clippy --fix 2024-01-18 13:59:49 +01:00
rename.rs Auto merge of #16400 - alibektas:15656/update_bail_message_ref_config, r=Veykril 2024-01-19 14:19:11 +00:00
rust_doc.rs Remove markdown module from rust-analyzer crate 2023-09-02 17:27:52 +02:00
search.rs Auto merge of #16441 - Young-Flash:exclude_tests_refs, r=Veykril 2024-01-31 07:53:28 +00:00
source_change.rs remove redundant clones 2024-01-07 00:17:48 +01:00
symbol_index.rs internal: switch to tracing from log 2024-01-30 12:27:31 -05:00
traits.rs internal: Move out WithFixture into dev-dep only crate 2023-12-18 15:24:08 +01:00
ty_filter.rs Run cargo fix --edition-idioms 2022-07-20 15:02:08 +02:00
use_trivial_constructor.rs Merge commit '9b3d03408c66749d56466bb09baf2a7177deb6ce' into sync-from-ra 2023-08-21 12:44:09 +03:00