Unnamed repository; edit this file 'description' to name the repository.
fix & run tests
vxpm 2023-09-09
parent 6afa5b0 · commit 6b487ed
-rw-r--r--crates/ide-completion/src/tests.rs1
-rw-r--r--crates/rust-analyzer/src/config.rs4
-rw-r--r--crates/rust-analyzer/src/integrated_benchmarks.rs2
-rw-r--r--docs/user/generated_config.adoc5
-rw-r--r--editors/code/package.json5
5 files changed, 15 insertions, 2 deletions
diff --git a/crates/ide-completion/src/tests.rs b/crates/ide-completion/src/tests.rs
index 2464e8d5f8..284bdd8af2 100644
--- a/crates/ide-completion/src/tests.rs
+++ b/crates/ide-completion/src/tests.rs
@@ -64,6 +64,7 @@ pub(crate) const TEST_CONFIG: CompletionConfig = CompletionConfig {
enable_imports_on_the_fly: true,
enable_self_on_the_fly: true,
enable_private_editable: false,
+ full_function_signatures: false,
callable: Some(CallableSnippets::FillArguments),
snippet_cap: SnippetCap::new(true),
prefer_no_std: false,
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index 07c6457b9c..9382f4ea19 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -209,14 +209,14 @@ config_data! {
completion_autoself_enable: bool = "true",
/// Whether to add parenthesis and argument snippets when completing function.
completion_callable_snippets: CallableCompletionDef = "\"fill_arguments\"",
+ /// Whether to show full function/method signatures in completion docs.
+ completion_fullFunctionSignatures_enable: bool = "false",
/// Maximum number of completions to return. If `None`, the limit is infinite.
completion_limit: Option<usize> = "null",
/// Whether to show postfix snippets like `dbg`, `if`, `not`, etc.
completion_postfix_enable: bool = "true",
/// Enables completions of private items and fields that are defined in the current workspace even if they are not visible at the current position.
completion_privateEditable_enable: bool = "false",
- /// Whether to show full function/method signatures in completion docs.
- completion_fullFunctionSignatures_enable: bool = "false",
/// Custom completion snippets.
// NOTE: Keep this list in sync with the feature docs of user snippets.
completion_snippets_custom: FxHashMap<String, SnippetDef> = r#"{
diff --git a/crates/rust-analyzer/src/integrated_benchmarks.rs b/crates/rust-analyzer/src/integrated_benchmarks.rs
index 5a11012b93..2c40255291 100644
--- a/crates/rust-analyzer/src/integrated_benchmarks.rs
+++ b/crates/rust-analyzer/src/integrated_benchmarks.rs
@@ -134,6 +134,7 @@ fn integrated_completion_benchmark() {
enable_imports_on_the_fly: true,
enable_self_on_the_fly: true,
enable_private_editable: true,
+ full_function_signatures: false,
callable: Some(CallableSnippets::FillArguments),
snippet_cap: SnippetCap::new(true),
insert_use: InsertUseConfig {
@@ -173,6 +174,7 @@ fn integrated_completion_benchmark() {
enable_imports_on_the_fly: true,
enable_self_on_the_fly: true,
enable_private_editable: true,
+ full_function_signatures: false,
callable: Some(CallableSnippets::FillArguments),
snippet_cap: SnippetCap::new(true),
insert_use: InsertUseConfig {
diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc
index 71feed0f72..cf549565fe 100644
--- a/docs/user/generated_config.adoc
+++ b/docs/user/generated_config.adoc
@@ -244,6 +244,11 @@ with `self` prefixed to them when inside a method.
--
Whether to add parenthesis and argument snippets when completing function.
--
+[[rust-analyzer.completion.fullFunctionSignatures.enable]]rust-analyzer.completion.fullFunctionSignatures.enable (default: `false`)::
++
+--
+Whether to show full function/method signatures in completion docs.
+--
[[rust-analyzer.completion.limit]]rust-analyzer.completion.limit (default: `null`)::
+
--
diff --git a/editors/code/package.json b/editors/code/package.json
index 233e7bf44b..e075e22762 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -799,6 +799,11 @@
"Do no snippet completions for callables."
]
},
+ "rust-analyzer.completion.fullFunctionSignatures.enable": {
+ "markdownDescription": "Whether to show full function/method signatures in completion docs.",
+ "default": false,
+ "type": "boolean"
+ },
"rust-analyzer.completion.limit": {
"markdownDescription": "Maximum number of completions to return. If `None`, the limit is infinite.",
"default": null,