]> git.lizzy.rs Git - rust.git/blobdiff - editors/code/package.json
Merge #11071 #11090
[rust.git] / editors / code / package.json
index 21de43e96f14defe0ee1e58d20e3a189b33ec1a0..9ab57d7dc5f387246fd5022329c09476321dddd9 100644 (file)
@@ -21,7 +21,7 @@
         "Programming Languages"
     ],
     "engines": {
-        "vscode": "^1.61.0"
+        "vscode": "^1.63.0"
     },
     "enableProposedApi": true,
     "scripts": {
@@ -44,7 +44,7 @@
     },
     "devDependencies": {
         "@types/node": "~14.17.5",
-        "@types/vscode": "^1.61.0",
+        "@types/vscode": "~1.63.0",
         "@typescript-eslint/eslint-plugin": "^5.5.0",
         "@typescript-eslint/parser": "^5.5.0",
         "@vscode/test-electron": "^1.6.2",
                 "title": "Memory Usage (Clears Database)",
                 "category": "Rust Analyzer"
             },
+            {
+                "command": "rust-analyzer.shuffleCrateGraph",
+                "title": "Shuffle Crate Graph",
+                "category": "Rust Analyzer"
+            },
             {
                 "command": "rust-analyzer.reloadWorkspace",
                 "title": "Reload workspace",
                 },
                 "rust-analyzer.completion.snippets": {
                     "markdownDescription": "Custom completion snippets.",
-                    "default": {},
+                    "default": {
+                        "Arc::new": {
+                            "postfix": "arc",
+                            "body": "Arc::new(${receiver})",
+                            "requires": "std::sync::Arc",
+                            "description": "Put the expression into an `Arc`",
+                            "scope": "expr"
+                        },
+                        "Rc::new": {
+                            "postfix": "rc",
+                            "body": "Rc::new(${receiver})",
+                            "requires": "std::rc::Rc",
+                            "description": "Put the expression into an `Rc`",
+                            "scope": "expr"
+                        },
+                        "Box::pin": {
+                            "postfix": "pinbox",
+                            "body": "Box::pin(${receiver})",
+                            "requires": "std::boxed::Box",
+                            "description": "Put the expression into a pinned `Box`",
+                            "scope": "expr"
+                        },
+                        "Ok": {
+                            "postfix": "ok",
+                            "body": "Ok(${receiver})",
+                            "description": "Wrap the expression in a `Result::Ok`",
+                            "scope": "expr"
+                        },
+                        "Err": {
+                            "postfix": "err",
+                            "body": "Err(${receiver})",
+                            "description": "Wrap the expression in a `Result::Err`",
+                            "scope": "expr"
+                        },
+                        "Some": {
+                            "postfix": "some",
+                            "body": "Some(${receiver})",
+                            "description": "Wrap the expression in an `Option::Some`",
+                            "scope": "expr"
+                        }
+                    },
                     "type": "object"
                 },
                 "rust-analyzer.completion.postfix.enable": {
                 "id": "attribute",
                 "description": "Style for attributes"
             },
+            {
+                "id": "attributeBracket",
+                "description": "Style for attribute invocation brackets, that is the `#[` and `]` tokens",
+                "superType": "punctuation"
+            },
             {
                 "id": "bitwise",
                 "description": "Style for bitwise operators",
                 "id": "constParameter",
                 "description": "Style for const generics"
             },
+            {
+                "id": "derive",
+                "description": "Style for derives",
+                "superType": "attribute"
+            },
             {
                 "id": "dot",
                 "description": "Style for .",