Make term search fuel configurable

This commit is contained in:
Tavo Annus 2024-05-08 18:03:38 +03:00
parent 9e1adc76e5
commit ab18604309
16 changed files with 56 additions and 9 deletions

View file

@ -1,6 +1,6 @@
use hir::{
db::ExpandDatabase,
term_search::{term_search, TermSearchCtx},
term_search::{term_search, TermSearchConfig, TermSearchCtx},
ClosureStyle, HirDisplay,
};
use ide_db::{
@ -47,7 +47,7 @@ fn fixes(ctx: &DiagnosticsContext<'_>, d: &hir::TypedHole) -> Option<Vec<Assist>
sema: &ctx.sema,
scope: &scope,
goal: d.expected.clone(),
config: Default::default(),
config: TermSearchConfig { fuel: ctx.config.term_search_fuel, ..Default::default() },
};
let paths = term_search(&term_search_ctx);