@@ -109,7 +109,8 @@ config_data! {
109109 ///
110110 /// Set to `"all"` to pass `--all-features` to cargo.
111111 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#`.
113114 checkOnSave_noDefaultFeatures: Option <bool > = "null" ,
114115 /// Override the command rust-analyzer uses to run build scripts and
115116 /// build procedural macros. The command is required to output json
@@ -134,7 +135,7 @@ config_data! {
134135 /// with `self` prefixed to them when inside a method.
135136 completion_autoself_enable: bool = "true" ,
136137 /// 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\" " ,
138139 /// Whether to show postfix snippets like `dbg`, `if`, `not`, etc.
139140 completion_postfix_enable: bool = "true" ,
140141 /// 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 {
10301031 && completion_item_edit_resolve ( & self . caps ) ,
10311032 enable_self_on_the_fly : self . data . completion_autoself_enable ,
10321033 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+ } ,
10371039 insert_use : self . insert_use_config ( ) ,
10381040 snippet_cap : SnippetCap :: new ( try_or_def ! (
10391041 self . caps
@@ -1385,6 +1387,7 @@ enum ImportGranularityDef {
13851387enum CallableCompletionDef {
13861388 FillArguments ,
13871389 AddParentheses ,
1390+ None ,
13881391}
13891392
13901393#[ derive( Deserialize , Debug , Clone ) ]
@@ -1662,16 +1665,16 @@ fn field_props(field: &str, ty: &str, doc: &[&str], default: &str) -> serde_json
16621665 "type" : "string" ,
16631666 "enum" : [ "workspace" , "workspace_and_dependencies" ] ,
16641667 "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. "
16671670 ] ,
16681671 } ,
16691672 "WorkspaceSymbolSearchKindDef" => set ! {
16701673 "type" : "string" ,
16711674 "enum" : [ "only_types" , "all_symbols" ] ,
16721675 "enumDescriptions" : [
1673- "Search for types only" ,
1674- "Search for all symbols kinds"
1676+ "Search for types only. " ,
1677+ "Search for all symbols kinds. "
16751678 ] ,
16761679 } ,
16771680 "ParallelCachePrimingNumThreads" => set ! {
@@ -1680,47 +1683,46 @@ fn field_props(field: &str, ty: &str, doc: &[&str], default: &str) -> serde_json
16801683 "maximum" : 255
16811684 } ,
16821685 "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"
16981691 ] ,
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+ ]
16991697 } ,
17001698 "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 ! {
17011712 "anyOf" : [
17021713 {
17031714 "type" : "string" ,
17041715 "enum" : [
1705- "always" ,
1706- "never" ,
1707- "mutable"
1716+ "all"
17081717 ] ,
17091718 "enumDescriptions" : [
1710- "Always show reborrow hints." ,
1711- "Never show reborrow hints." ,
1712- "Only show mutable reborrow hints."
1719+ "Pass `--all-features` to cargo" ,
17131720 ]
17141721 } ,
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+ }
17241726 ] ,
17251727 } ,
17261728 "Option<CargoFeatures>" => set ! {
@@ -1741,21 +1743,18 @@ fn field_props(field: &str, ty: &str, doc: &[&str], default: &str) -> serde_json
17411743 { "type" : "null" }
17421744 ] ,
17431745 } ,
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" ,
17581752 ] ,
1753+ "enumDescriptions" : [
1754+ "Add call parentheses and pre-fill arguments." ,
1755+ "Add call parentheses." ,
1756+ "Do no snippet completions for callables."
1757+ ]
17591758 } ,
17601759 "SignatureDetail" => set ! {
17611760 "type" : "string" ,
0 commit comments