]> git.lizzy.rs Git - rust.git/blobdiff - editors/code/src/main.ts
Add **Copy Run Command Line** command for vscode
[rust.git] / editors / code / src / main.ts
index 694da9409d01a9ac89778d5646634563cebbcbb7..43cae5c7fe7c67f48a8cf17c78acd0d6a120edcf 100644 (file)
@@ -108,6 +108,7 @@ async function tryActivate(context: vscode.ExtensionContext) {
     ctx.registerCommand('viewHir', commands.viewHir);
     ctx.registerCommand('expandMacro', commands.expandMacro);
     ctx.registerCommand('run', commands.run);
+    ctx.registerCommand('copyRunCommandLine', commands.copyRunCommandLine);
     ctx.registerCommand('debug', commands.debug);
     ctx.registerCommand('newDebugConfig', commands.newDebugConfig);
     ctx.registerCommand('openDocs', commands.openDocs);
@@ -167,7 +168,7 @@ async function bootstrapExtension(config: Config, state: PersistentState): Promi
         }
         return;
     };
-    if (serverPath(config) !== null) return;
+    if (serverPath(config)) return;
 
     const now = Date.now();
     if (config.package.releaseTag === NIGHTLY_TAG) {
@@ -208,7 +209,6 @@ async function bootstrapExtension(config: Config, state: PersistentState): Promi
             url: artifact.browser_download_url,
             dest,
             progressTitle: "Downloading rust-analyzer extension",
-            overwrite: true,
         });
     });
 
@@ -294,6 +294,7 @@ async function getServer(config: Config, state: PersistentState): Promise<string
         "x64 linux": "x86_64-unknown-linux-gnu",
         "x64 darwin": "x86_64-apple-darwin",
         "arm64 win32": "aarch64-pc-windows-msvc",
+        "arm64 linux": "aarch64-unknown-linux-gnu",
         "arm64 darwin": "aarch64-apple-darwin",
     };
     const platform = platforms[`${process.arch} ${process.platform}`];
@@ -339,7 +340,6 @@ async function getServer(config: Config, state: PersistentState): Promise<string
             progressTitle: "Downloading rust-analyzer server",
             gunzip: true,
             mode: 0o755,
-            overwrite: true,
         });
     });