aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/rust-analyzer/src/config.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index 063b1b316..d75c48597 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -275,6 +275,7 @@ impl Config {
275 { 275 {
276 self.client_caps.code_action_literals = value; 276 self.client_caps.code_action_literals = value;
277 } 277 }
278
278 self.completion.allow_snippets(false); 279 self.completion.allow_snippets(false);
279 if let Some(completion) = &doc_caps.completion { 280 if let Some(completion) = &doc_caps.completion {
280 if let Some(completion_item) = &completion.completion_item { 281 if let Some(completion_item) = &completion.completion_item {
@@ -283,7 +284,6 @@ impl Config {
283 } 284 }
284 } 285 }
285 } 286 }
286 self.assist.allow_snippets(false);
287 } 287 }
288 288
289 if let Some(window_caps) = caps.window.as_ref() { 289 if let Some(window_caps) = caps.window.as_ref() {
@@ -291,5 +291,12 @@ impl Config {
291 self.client_caps.work_done_progress = value; 291 self.client_caps.work_done_progress = value;
292 } 292 }
293 } 293 }
294
295 self.assist.allow_snippets(false);
296 if let Some(experimental) = &caps.experimental {
297 let enable =
298 experimental.get("snippetTextEdit").and_then(|it| it.as_bool()) == Some(true);
299 self.assist.allow_snippets(enable);
300 }
294 } 301 }
295} 302}