fix: Fix fill-arguments completions not working

This commit is contained in:
Lukas Wirth 2022-05-13 19:52:44 +02:00
parent 4f6b2a20fd
commit 3577c44dee
8 changed files with 32 additions and 29 deletions

View file

@ -14,13 +14,18 @@ pub struct CompletionConfig {
pub enable_imports_on_the_fly: bool,
pub enable_self_on_the_fly: bool,
pub enable_private_editable: bool,
pub add_call_parenthesis: bool,
pub add_call_argument_snippets: bool,
pub callable: Option<CallableSnippets>,
pub snippet_cap: Option<SnippetCap>,
pub insert_use: InsertUseConfig,
pub snippets: Vec<Snippet>,
}
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum CallableSnippets {
FillArguments,
AddParentheses,
}
impl CompletionConfig {
pub fn postfix_snippets(&self) -> impl Iterator<Item = (&str, &Snippet)> {
self.snippets