Skip to content

Commit

Permalink
Add mirrord.enabledByDefault setting
Browse files Browse the repository at this point in the history
  • Loading branch information
gememma committed Aug 14, 2024
1 parent 61ddb97 commit 74b3754
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@
],
"default": true,
"description": "Automatically update mirrord binary."
},
"mirrord.enabledByDefault": {
"type": [
"boolean"
],
"default": false,
"description": "Enable mirrord by default on startup."
}
}
},
Expand Down
5 changes: 3 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ export let globalContext: vscode.ExtensionContext;
export async function activate(context: vscode.ExtensionContext) {
globalContext = context;

context.workspaceState.update('enabled', false);
const enabled = vscode.workspace.getConfiguration().get<boolean | null>("mirrord.enabledByDefault");
context.workspaceState.update('enabled', enabled);
vscode.debug.registerDebugConfigurationProvider('*', new ConfigurationProvider(), 2);

// start mirrord binary updates, so that we avoid downloading mid session
await getMirrordBinary(true);

Expand Down

0 comments on commit 74b3754

Please sign in to comment.