]> git.lizzy.rs Git - rust.git/blobdiff - editors/code/package.json
Merge #11071 #11090
[rust.git] / editors / code / package.json
index eb441a2bf97318bc1a3e6af96ee6dd0b5b7f6c9f..9ab57d7dc5f387246fd5022329c09476321dddd9 100644 (file)
@@ -21,7 +21,7 @@
         "Programming Languages"
     ],
     "engines": {
-        "vscode": "^1.62.0"
+        "vscode": "^1.63.0"
     },
     "enableProposedApi": true,
     "scripts": {
@@ -44,7 +44,7 @@
     },
     "devDependencies": {
         "@types/node": "~14.17.5",
-        "@types/vscode": "~1.62.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": {