You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would something like this be needed / accepted ? I find myself copying, creating .vscode/launch.json and pasting the contents of the already existing similar command a lot and I would love to just have a command that does all this.
I'm already creating a mini vscode extension that acts as a wrapper around "lldb.getCargoLaunchConfigs" but I was thinking maybe something like this can be a pull request for this extension.
functionactivate(context){letdisposable=vscode.commands.registerCommand("cargo-quick-config.generateStuff",asyncfunction(){awaitvscode.commands.executeCommand("lldb.getCargoLaunchConfigs");if(vscode.window.activeTextEditor.document.isUntitled){constcontent=vscode.window.activeTextEditor.document.getText();constworkSpaceFolder=vscode.workspace.workspaceFolders
? vscode.workspace.workspaceFolders[0].uri.fsPath
: null;if(workSpaceFolder){constfilePath=path.join(workSpaceFolder,"MyNewLaunch.json");fs.writeFileSync(filePath,content);awaitvscode.commands.executeCommand("workbench.action.revertAndCloseActiveEditor");// Use the command to close the active editorawaitvscode.commands.executeCommand("workbench.action.closeActiveEditor");}else{vscode.window.showWarningMessage("No workspace folder found.");}}});context.subscriptions.push(disposable);}
The text was updated successfully, but these errors were encountered:
Would something like this be needed / accepted ? I find myself copying, creating .vscode/launch.json and pasting the contents of the already existing similar command a lot and I would love to just have a command that does all this.
I'm already creating a mini vscode extension that acts as a wrapper around "lldb.getCargoLaunchConfigs" but I was thinking maybe something like this can be a pull request for this extension.
The text was updated successfully, but these errors were encountered: