This commit is contained in:
Stanislav 2022-09-09 20:58:06 +03:00
parent 773f9b38e3
commit f7f4792f4f
4 changed files with 14 additions and 17 deletions

View file

@ -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) => {

View file

@ -219,10 +219,6 @@ config_data! {
files_excludeDirs: Vec<PathBuf> = "[]",
/// 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<PathBuf> = "null",
/// Exclude imports from find-all-references.
references_excludeImports: bool = "false",
/// Command to be executed instead of 'cargo' for runnables.
runnables_command: Option<String> = "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 {