diff options
author | Aleksey Kladov <[email protected]> | 2020-05-14 14:36:15 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-05-14 14:36:15 +0100 |
commit | acedad8134669b3deba48e59d28e62334ae5c4d4 (patch) | |
tree | 40a5942523ab3e7f86cf3829c40cc752fc3c8ce1 | |
parent | fc0c5dfcd1c021d7e9662b20c7d394db65bf3388 (diff) |
Minor
-rw-r--r-- | crates/rust-analyzer/src/to_proto.rs | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs index 2696ecac4..a8e2e535f 100644 --- a/crates/rust-analyzer/src/to_proto.rs +++ b/crates/rust-analyzer/src/to_proto.rs | |||
@@ -164,16 +164,6 @@ pub(crate) fn completion_item( | |||
164 | additional_text_edits: Some(additional_text_edits), | 164 | additional_text_edits: Some(additional_text_edits), |
165 | documentation: completion_item.documentation().map(documentation), | 165 | documentation: completion_item.documentation().map(documentation), |
166 | deprecated: Some(completion_item.deprecated()), | 166 | deprecated: Some(completion_item.deprecated()), |
167 | command: if completion_item.trigger_call_info() { | ||
168 | let cmd = lsp_types::Command { | ||
169 | title: "triggerParameterHints".into(), | ||
170 | command: "editor.action.triggerParameterHints".into(), | ||
171 | arguments: None, | ||
172 | }; | ||
173 | Some(cmd) | ||
174 | } else { | ||
175 | None | ||
176 | }, | ||
177 | ..Default::default() | 167 | ..Default::default() |
178 | }; | 168 | }; |
179 | 169 | ||
@@ -187,6 +177,14 @@ pub(crate) fn completion_item( | |||
187 | res.tags = Some(vec![lsp_types::CompletionItemTag::Deprecated]) | 177 | res.tags = Some(vec![lsp_types::CompletionItemTag::Deprecated]) |
188 | } | 178 | } |
189 | 179 | ||
180 | if completion_item.trigger_call_info() { | ||
181 | res.command = Some(lsp_types::Command { | ||
182 | title: "triggerParameterHints".into(), | ||
183 | command: "editor.action.triggerParameterHints".into(), | ||
184 | arguments: None, | ||
185 | }); | ||
186 | } | ||
187 | |||
190 | res.insert_text_format = Some(insert_text_format(completion_item.insert_text_format())); | 188 | res.insert_text_format = Some(insert_text_format(completion_item.insert_text_format())); |
191 | 189 | ||
192 | res | 190 | res |