]> git.lizzy.rs Git - rust.git/commitdiff
Properly fill the completion settings
authorKirill Bulatov <mail4score@gmail.com>
Sat, 14 Nov 2020 21:17:08 +0000 (23:17 +0200)
committerKirill Bulatov <mail4score@gmail.com>
Mon, 16 Nov 2020 19:19:06 +0000 (21:19 +0200)
crates/rust-analyzer/src/config.rs

index d16796590087947737db0eb0e231d1b4dba43d07..5fc6800cf2fd9a6e934f73ed325ac8018470c1b8 100644 (file)
@@ -294,10 +294,6 @@ pub fn update(&mut self, json: serde_json::Value) {
             max_length: data.inlayHints_maxLength,
         };
 
-        self.completion.enable_postfix_completions = data.completion_postfix_enable;
-        self.completion.add_call_parenthesis = data.completion_addCallParenthesis;
-        self.completion.add_call_argument_snippets = data.completion_addCallArgumentSnippets;
-
         self.assist.insert_use.merge = match data.assist_importMergeBehaviour {
             MergeBehaviourDef::None => None,
             MergeBehaviourDef::Full => Some(MergeBehaviour::Full),
@@ -309,6 +305,11 @@ pub fn update(&mut self, json: serde_json::Value) {
             ImportPrefixDef::BySelf => PrefixKind::BySelf,
         };
 
+        self.completion.enable_postfix_completions = data.completion_postfix_enable;
+        self.completion.add_call_parenthesis = data.completion_addCallParenthesis;
+        self.completion.add_call_argument_snippets = data.completion_addCallArgumentSnippets;
+        self.completion.merge = self.assist.insert_use.merge;
+
         self.call_info_full = data.callInfo_full;
 
         self.lens = LensConfig {