diff --git a/package.json b/package.json index c570284..7b9b945 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,30 @@ { "command": "mind-reader.helloWorld", "title": "Hello World" + }, + { + "command": "mind-reader.increaseFontScale", + "title": "Increase Font Scale" + }, + { + "command": "mind-reader.decreaseFontScale", + "title": "Decrease Font Scale" + }, + { + "command": "mind-reader.resetFontScale", + "title": "Reset Font Scale" + }, + { + "command": "mind-reader.increaseEditorScale", + "title": "Increase Editor Scale" + }, + { + "command": "mind-reader.decreaseEditorScale", + "title": "Decrease Editor Scale" + }, + { + "command": "mind-reader.resetEditorScale", + "title": "Reset Editor Scale" } ] }, @@ -40,9 +64,7 @@ "glob": "^7.1.7", "mocha": "^8.4.0", "typescript": "^4.3.2", - "vscode-test": "^1.5.2" - }, - "dependencies": { + "vscode-test": "^1.5.2", "@vscode/test-electron": "^1.6.2" } } diff --git a/src/extension.ts b/src/extension.ts index e5bf0fb..1d5a9c8 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -1,14 +1,50 @@ import * as vscode from 'vscode'; export function activate(context: vscode.ExtensionContext) { - console.log('Congratulations, your extension "mind-reader" is now active!'); - vscode.window.showInformationMessage('Mind_Reader is loaded!') + console.log('Congratulations, your extension "mind-reader" is now active!'); + vscode.window.showInformationMessage('Mind_Reader is loaded!'); - let disposable = vscode.commands.registerCommand('mind-reader.helloWorld', () => { - vscode.window.showInformationMessage('Hello World from Mind_Reader!'); - }); + // Increase Font Scale + context.subscriptions.push( + vscode.commands.registerCommand('mind-reader.increaseFontScale', () => { + vscode.commands.executeCommand('editor.action.fontZoomIn'); + }) + ); - context.subscriptions.push(disposable); + // Decrease Font Scale + context.subscriptions.push( + vscode.commands.registerCommand('mind-reader.decreaseFontScale', () => { + vscode.commands.executeCommand('editor.action.fontZoomOut'); + }) + ); + + // Reset Font Scale + context.subscriptions.push( + vscode.commands.registerCommand('mind-reader.resetFontScale', () => { + vscode.commands.executeCommand('editor.action.fontZoomReset'); + }) + ); + + // Increase Editor Scale + context.subscriptions.push( + vscode.commands.registerCommand('mind-reader.increaseEditorScale', () => { + vscode.commands.executeCommand('workbench.action.zoomIn'); + }) + ); + + // Decrease Editor Scale + context.subscriptions.push( + vscode.commands.registerCommand('mind-reader.decreaseEditorScale', () => { + vscode.commands.executeCommand('workbench.action.zoomOut'); + }) + ); + + // Reset Editor Scale + context.subscriptions.push( + vscode.commands.registerCommand('mind-reader.resetEditorScale', () => { + vscode.commands.executeCommand('workbench.action.zoomReset'); + }) + ); } export function deactivate() {} diff --git a/tsconfig.json b/tsconfig.json index 7d7ccee..3d8dbc6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,18 +8,14 @@ ], "sourceMap": true, "rootDir": "src", - "strict": true, /* enable all strict type-checking options */ "strictPropertyInitialization": false, - "declaration": true, - /* Additional Checks */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ + "noUnusedLocals": true, + "noUnusedParameters": true, + "strict": true, /* enable all strict type-checking options */ }, "exclude": [ "node_modules", ".vscode-test", - "examples", "out" ] }