@@ -109,7 +109,8 @@ config_data! {
109
109
///
110
110
/// Set to `"all"` to pass `--all-features` to cargo.
111
111
checkOnSave_features: Option <CargoFeatures > = "null" ,
112
- /// Do not activate the `default` feature.
112
+ /// Whether to pass `--no-default-features` to cargo. Defaults to
113
+ /// `#rust-analyzer.cargo.noDefaultFeatures#`.
113
114
checkOnSave_noDefaultFeatures: Option <bool > = "null" ,
114
115
/// Override the command rust-analyzer uses to run build scripts and
115
116
/// build procedural macros. The command is required to output json
@@ -134,7 +135,7 @@ config_data! {
134
135
/// with `self` prefixed to them when inside a method.
135
136
completion_autoself_enable: bool = "true" ,
136
137
/// Whether to add parenthesis and argument snippets when completing function.
137
- completion_callable_snippets: Option < CallableCompletionDef > = "\" fill_arguments\" " ,
138
+ completion_callable_snippets: CallableCompletionDef = "\" fill_arguments\" " ,
138
139
/// Whether to show postfix snippets like `dbg`, `if`, `not`, etc.
139
140
completion_postfix_enable: bool = "true" ,
140
141
/// Enables completions of private items and fields that are defined in the current workspace even if they are not visible at the current position.
@@ -1030,10 +1031,11 @@ impl Config {
1030
1031
&& completion_item_edit_resolve ( & self . caps ) ,
1031
1032
enable_self_on_the_fly : self . data . completion_autoself_enable ,
1032
1033
enable_private_editable : self . data . completion_privateEditable_enable ,
1033
- callable : self . data . completion_callable_snippets . map ( |it| match it {
1034
- CallableCompletionDef :: FillArguments => CallableSnippets :: FillArguments ,
1035
- CallableCompletionDef :: AddParentheses => CallableSnippets :: AddParentheses ,
1036
- } ) ,
1034
+ callable : match self . data . completion_callable_snippets {
1035
+ CallableCompletionDef :: FillArguments => Some ( CallableSnippets :: FillArguments ) ,
1036
+ CallableCompletionDef :: AddParentheses => Some ( CallableSnippets :: AddParentheses ) ,
1037
+ CallableCompletionDef :: None => None ,
1038
+ } ,
1037
1039
insert_use : self . insert_use_config ( ) ,
1038
1040
snippet_cap : SnippetCap :: new ( try_or_def ! (
1039
1041
self . caps
@@ -1385,6 +1387,7 @@ enum ImportGranularityDef {
1385
1387
enum CallableCompletionDef {
1386
1388
FillArguments ,
1387
1389
AddParentheses ,
1390
+ None ,
1388
1391
}
1389
1392
1390
1393
#[ derive( Deserialize , Debug , Clone ) ]
@@ -1662,16 +1665,16 @@ fn field_props(field: &str, ty: &str, doc: &[&str], default: &str) -> serde_json
1662
1665
"type" : "string" ,
1663
1666
"enum" : [ "workspace" , "workspace_and_dependencies" ] ,
1664
1667
"enumDescriptions" : [
1665
- "Search in current workspace only" ,
1666
- "Search in current workspace and dependencies"
1668
+ "Search in current workspace only. " ,
1669
+ "Search in current workspace and dependencies. "
1667
1670
] ,
1668
1671
} ,
1669
1672
"WorkspaceSymbolSearchKindDef" => set ! {
1670
1673
"type" : "string" ,
1671
1674
"enum" : [ "only_types" , "all_symbols" ] ,
1672
1675
"enumDescriptions" : [
1673
- "Search for types only" ,
1674
- "Search for all symbols kinds"
1676
+ "Search for types only. " ,
1677
+ "Search for all symbols kinds. "
1675
1678
] ,
1676
1679
} ,
1677
1680
"ParallelCachePrimingNumThreads" => set ! {
@@ -1680,47 +1683,46 @@ fn field_props(field: &str, ty: &str, doc: &[&str], default: &str) -> serde_json
1680
1683
"maximum" : 255
1681
1684
} ,
1682
1685
"LifetimeElisionDef" => set ! {
1683
- "anyOf" : [
1684
- {
1685
- "type" : "string" ,
1686
- "enum" : [
1687
- "always" ,
1688
- "never" ,
1689
- "skip_trivial"
1690
- ] ,
1691
- "enumDescriptions" : [
1692
- "Always show lifetime elision hints." ,
1693
- "Never show lifetime elision hints." ,
1694
- "Only show lifetime elision hints if a return type is involved."
1695
- ]
1696
- } ,
1697
- { "type" : "boolean" }
1686
+ "type" : "string" ,
1687
+ "enum" : [
1688
+ "always" ,
1689
+ "never" ,
1690
+ "skip_trivial"
1698
1691
] ,
1692
+ "enumDescriptions" : [
1693
+ "Always show lifetime elision hints." ,
1694
+ "Never show lifetime elision hints." ,
1695
+ "Only show lifetime elision hints if a return type is involved."
1696
+ ]
1699
1697
} ,
1700
1698
"ReborrowHintsDef" => set ! {
1699
+ "type" : "string" ,
1700
+ "enum" : [
1701
+ "always" ,
1702
+ "never" ,
1703
+ "mutable"
1704
+ ] ,
1705
+ "enumDescriptions" : [
1706
+ "Always show reborrow hints." ,
1707
+ "Never show reborrow hints." ,
1708
+ "Only show mutable reborrow hints."
1709
+ ]
1710
+ } ,
1711
+ "CargoFeatures" => set ! {
1701
1712
"anyOf" : [
1702
1713
{
1703
1714
"type" : "string" ,
1704
1715
"enum" : [
1705
- "always" ,
1706
- "never" ,
1707
- "mutable"
1716
+ "all"
1708
1717
] ,
1709
1718
"enumDescriptions" : [
1710
- "Always show reborrow hints." ,
1711
- "Never show reborrow hints." ,
1712
- "Only show mutable reborrow hints."
1719
+ "Pass `--all-features` to cargo" ,
1713
1720
]
1714
1721
} ,
1715
- { "type" : "boolean" }
1716
- ] ,
1717
- } ,
1718
- "CargoFeatures" => set ! {
1719
- "type" : [ "string" , "array" ] ,
1720
- "items" : { "type" : "string" } ,
1721
- "enum" : [ "all" ] ,
1722
- "enumDescriptions" : [
1723
- "Pass `--all-features` to cargo" ,
1722
+ {
1723
+ "type" : "array" ,
1724
+ "items" : { "type" : "string" }
1725
+ }
1724
1726
] ,
1725
1727
} ,
1726
1728
"Option<CargoFeatures>" => set ! {
@@ -1741,21 +1743,18 @@ fn field_props(field: &str, ty: &str, doc: &[&str], default: &str) -> serde_json
1741
1743
{ "type" : "null" }
1742
1744
] ,
1743
1745
} ,
1744
- "Option<CallableCompletionDef>" => set ! {
1745
- "anyOf" : [
1746
- {
1747
- "type" : "string" ,
1748
- "enum" : [
1749
- "fill_arguments" ,
1750
- "add_parentheses"
1751
- ] ,
1752
- "enumDescriptions" : [
1753
- "Add call parentheses and pre-fill arguments" ,
1754
- "Add call parentheses"
1755
- ]
1756
- } ,
1757
- { "type" : "null" }
1746
+ "CallableCompletionDef" => set ! {
1747
+ "type" : "string" ,
1748
+ "enum" : [
1749
+ "fill_arguments" ,
1750
+ "add_parentheses" ,
1751
+ "none" ,
1758
1752
] ,
1753
+ "enumDescriptions" : [
1754
+ "Add call parentheses and pre-fill arguments." ,
1755
+ "Add call parentheses." ,
1756
+ "Do no snippet completions for callables."
1757
+ ]
1759
1758
} ,
1760
1759
"SignatureDetail" => set ! {
1761
1760
"type" : "string" ,
0 commit comments