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

@ -354,7 +354,6 @@ pub(crate) fn complete_expr(acc: &mut Completions, ctx: &CompletionContext<'_>)
enable_borrowcheck: false,
many_alternatives_threshold: 1,
fuel: 200,
..Default::default()
},
};
let exprs = hir::term_search::term_search(&term_search_ctx);

View file

@ -15,6 +15,7 @@ pub struct CompletionConfig {
pub enable_self_on_the_fly: bool,
pub enable_private_editable: bool,
pub enable_term_search: bool,
pub term_search_fuel: u64,
pub full_function_signatures: bool,
pub callable: Option<CallableSnippets>,
pub snippet_cap: Option<SnippetCap>,

View file

@ -80,6 +80,7 @@ pub(crate) const TEST_CONFIG: CompletionConfig = CompletionConfig {
},
snippets: Vec::new(),
limit: None,
term_search_fuel: 200,
};
pub(crate) fn completion_list(ra_fixture: &str) -> String {