about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/editors/code
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-06-11 08:49:19 +0000
committerbors <bors@rust-lang.org>2024-06-11 08:49:19 +0000
commitd181bfdb0bfc89ec2e8774858980156be00ad81a (patch)
tree126dfafea1ab4bcfb4555f26a0337ee8a3201231 /src/tools/rust-analyzer/editors/code
parent704b56b5bb843024e1e2cb41a6e95b127a6cb8d5 (diff)
parent34d273b5be58685816f74559193abce0e19f3c09 (diff)
downloadrust-d181bfdb0bfc89ec2e8774858980156be00ad81a.tar.gz
rust-d181bfdb0bfc89ec2e8774858980156be00ad81a.zip
Auto merge of #17374 - Veykril:configs, r=Veykril
Allow choosing logical cores for num threads config
Diffstat (limited to 'src/tools/rust-analyzer/editors/code')
-rw-r--r--src/tools/rust-analyzer/editors/code/package.json49
1 files changed, 40 insertions, 9 deletions
diff --git a/src/tools/rust-analyzer/editors/code/package.json b/src/tools/rust-analyzer/editors/code/package.json
index cd11b56d152..b447106d999 100644
--- a/src/tools/rust-analyzer/editors/code/package.json
+++ b/src/tools/rust-analyzer/editors/code/package.json
@@ -609,10 +609,25 @@
                 "properties": {
                     "rust-analyzer.cachePriming.numThreads": {
                         "markdownDescription": "How many worker threads to handle priming caches. The default `0` means to pick automatically.",
-                        "default": 0,
-                        "type": "number",
-                        "minimum": 0,
-                        "maximum": 255
+                        "default": "physical",
+                        "anyOf": [
+                            {
+                                "type": "number",
+                                "minimum": 0,
+                                "maximum": 255
+                            },
+                            {
+                                "type": "string",
+                                "enum": [
+                                    "physical",
+                                    "logical"
+                                ],
+                                "enumDescriptions": [
+                                    "Use the number of physical cores",
+                                    "Use the number of logical cores"
+                                ]
+                            }
+                        ]
                     }
                 }
             },
@@ -2225,11 +2240,27 @@
                     "rust-analyzer.numThreads": {
                         "markdownDescription": "How many worker threads in the main loop. The default `null` means to pick automatically.",
                         "default": null,
-                        "type": [
-                            "null",
-                            "integer"
-                        ],
-                        "minimum": 0
+                        "anyOf": [
+                            {
+                                "type": "null"
+                            },
+                            {
+                                "type": "number",
+                                "minimum": 0,
+                                "maximum": 255
+                            },
+                            {
+                                "type": "string",
+                                "enum": [
+                                    "physical",
+                                    "logical"
+                                ],
+                                "enumDescriptions": [
+                                    "Use the number of physical cores",
+                                    "Use the number of logical cores"
+                                ]
+                            }
+                        ]
                     }
                 }
             },