Increase search depth to account for more granual steps

This commit is contained in:
Tavo Annus 2024-06-22 15:06:07 +03:00
parent b4f3eb48db
commit 3825d8bd0f
3 changed files with 7 additions and 5 deletions

View file

@ -238,7 +238,7 @@ pub struct TermSearchConfig {
impl Default for TermSearchConfig {
fn default() -> Self {
Self { enable_borrowcheck: true, many_alternatives_threshold: 1, fuel: 400 }
Self { enable_borrowcheck: true, many_alternatives_threshold: 1, fuel: 1200 }
}
}

View file

@ -448,6 +448,7 @@ pub(super) fn impl_method<'a, DB: HirDatabase>(
AssocItem::Function(f) => Some((imp, ty, f)),
_ => None,
})
.filter(|_| should_continue())
.filter_map(move |(imp, ty, it)| {
let fn_generics = GenericDef::from(it);
let imp_generics = GenericDef::from(imp);
@ -636,6 +637,7 @@ pub(super) fn impl_static_method<'a, DB: HirDatabase>(
AssocItem::Function(f) => Some((imp, ty, f)),
_ => None,
})
.filter(|_| should_continue())
.filter_map(move |(imp, ty, it)| {
let fn_generics = GenericDef::from(it);
let imp_generics = GenericDef::from(imp);

View file

@ -341,8 +341,8 @@ config_data! {
assist_emitMustUse: bool = false,
/// Placeholder expression to use for missing expressions in assists.
assist_expressionFillDefault: ExprFillDefaultDef = ExprFillDefaultDef::Todo,
/// Term search fuel in "units of work" for assists (Defaults to 400).
assist_termSearch_fuel: usize = 400,
/// Term search fuel in "units of work" for assists (Defaults to 1800).
assist_termSearch_fuel: usize = 1800,
/// 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,
@ -426,8 +426,8 @@ config_data! {
}"#).unwrap(),
/// Whether to enable term search based snippets like `Some(foo.bar().baz())`.
completion_termSearch_enable: bool = false,
/// Term search fuel in "units of work" for autocompletion (Defaults to 200).
completion_termSearch_fuel: usize = 200,
/// Term search fuel in "units of work" for autocompletion (Defaults to 1000).
completion_termSearch_fuel: usize = 1000,
/// Controls file watching implementation.
files_watcher: FilesWatcherDef = FilesWatcherDef::Client,