|
|
@ -221,10 +221,18 @@ fn request_completion(
|
|
|
|
.iter()
|
|
|
|
.iter()
|
|
|
|
.find(|&trigger| trigger_text.ends_with(trigger))
|
|
|
|
.find(|&trigger| trigger_text.ends_with(trigger))
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if trigger_char.is_some() {
|
|
|
|
lsp::CompletionContext {
|
|
|
|
lsp::CompletionContext {
|
|
|
|
trigger_kind: lsp::CompletionTriggerKind::TRIGGER_CHARACTER,
|
|
|
|
trigger_kind: lsp::CompletionTriggerKind::TRIGGER_CHARACTER,
|
|
|
|
trigger_character: trigger_char.cloned(),
|
|
|
|
trigger_character: trigger_char.cloned(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
lsp::CompletionContext {
|
|
|
|
|
|
|
|
trigger_kind: lsp::CompletionTriggerKind::INVOKED,
|
|
|
|
|
|
|
|
trigger_character: None,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
let completion_response = ls.completion(doc_id, pos, None, context).unwrap();
|
|
|
|
let completion_response = ls.completion(doc_id, pos, None, context).unwrap();
|
|
|
|