mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Add limit setting
This commit is contained in:
parent
6e52c64031
commit
ec89fc85a8
4 changed files with 7 additions and 0 deletions
|
@ -199,6 +199,8 @@ config_data! {
|
|||
completion_postfix_enable: bool = "true",
|
||||
/// Enables completions of private items and fields that are defined in the current workspace even if they are not visible at the current position.
|
||||
completion_privateEditable_enable: bool = "false",
|
||||
/// Maximum number of completions to return. If `None`, the limit is infinite.
|
||||
completion_limit: Option<usize> = "null",
|
||||
/// Custom completion snippets.
|
||||
// NOTE: Keep this list in sync with the feature docs of user snippets.
|
||||
completion_snippets_custom: FxHashMap<String, SnippetDef> = r#"{
|
||||
|
@ -1313,6 +1315,7 @@ impl Config {
|
|||
.snippet_support?
|
||||
)),
|
||||
snippets: self.snippets.clone(),
|
||||
limit: self.data.completion_limit,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -146,6 +146,7 @@ fn integrated_completion_benchmark() {
|
|||
},
|
||||
snippets: Vec::new(),
|
||||
prefer_no_std: false,
|
||||
limit: None
|
||||
};
|
||||
let position =
|
||||
FilePosition { file_id, offset: TextSize::try_from(completion_offset).unwrap() };
|
||||
|
@ -184,6 +185,7 @@ fn integrated_completion_benchmark() {
|
|||
},
|
||||
snippets: Vec::new(),
|
||||
prefer_no_std: false,
|
||||
limit: None
|
||||
};
|
||||
let position =
|
||||
FilePosition { file_id, offset: TextSize::try_from(completion_offset).unwrap() };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue