Honor snippet capability

closes #2518
This commit is contained in:
Aleksey Kladov
2020-04-24 02:39:07 +02:00
parent 5fd5de4061
commit 440cd05edb
2 changed files with 14 additions and 0 deletions

View File

@@ -215,5 +215,13 @@ impl Config {
if let Some(value) = caps.folding_range.as_ref().and_then(|it| it.line_folding_only) {
self.client_caps.line_folding_only = value
}
self.completion.allow_snippets(false);
if let Some(completion) = &caps.completion {
if let Some(completion_item) = &completion.completion_item {
if let Some(value) = completion_item.snippet_support {
self.completion.allow_snippets(value);
}
}
}
}
}