@@ -11,8 +11,9 @@ use std::{ffi::OsString, fmt, iter, path::PathBuf};
11
11
12
12
use flycheck:: FlycheckConfig ;
13
13
use ide:: {
14
- AssistConfig , CompletionConfig , DiagnosticsConfig , ExprFillDefaultMode , HighlightRelatedConfig ,
15
- HoverConfig , HoverDocFormat , InlayHintsConfig , JoinLinesConfig , Snippet , SnippetScope ,
14
+ AssistConfig , CallableSnippets , CompletionConfig , DiagnosticsConfig , ExprFillDefaultMode ,
15
+ HighlightRelatedConfig , HoverConfig , HoverDocFormat , InlayHintsConfig , JoinLinesConfig ,
16
+ Snippet , SnippetScope ,
16
17
} ;
17
18
use ide_db:: {
18
19
imports:: insert_use:: { ImportGranularity , InsertUseConfig , PrefixKind } ,
@@ -1029,14 +1030,10 @@ impl Config {
1029
1030
&& completion_item_edit_resolve ( & self . caps ) ,
1030
1031
enable_self_on_the_fly : self . data . completion_autoself_enable ,
1031
1032
enable_private_editable : self . data . completion_privateEditable_enable ,
1032
- add_call_parenthesis : matches ! (
1033
- self . data. completion_callable_snippets,
1034
- Some ( CallableCompletionDef :: AddParentheses )
1035
- ) ,
1036
- add_call_argument_snippets : matches ! (
1037
- self . data. completion_callable_snippets,
1038
- Some ( CallableCompletionDef :: FillArguments )
1039
- ) ,
1033
+ callable : self . data . completion_callable_snippets . map ( |it| match it {
1034
+ CallableCompletionDef :: FillArguments => CallableSnippets :: FillArguments ,
1035
+ CallableCompletionDef :: AddParentheses => CallableSnippets :: AddParentheses ,
1036
+ } ) ,
1040
1037
insert_use : self . insert_use_config ( ) ,
1041
1038
snippet_cap : SnippetCap :: new ( try_or_def ! (
1042
1039
self . caps
@@ -1383,7 +1380,7 @@ enum ImportGranularityDef {
1383
1380
Module ,
1384
1381
}
1385
1382
1386
- #[ derive( Deserialize , Debug , Clone ) ]
1383
+ #[ derive( Deserialize , Debug , Copy , Clone ) ]
1387
1384
#[ serde( rename_all = "snake_case" ) ]
1388
1385
enum CallableCompletionDef {
1389
1386
FillArguments ,
0 commit comments