## 1.7.0
This commit is contained in:
parent
ed2cd40f59
commit
24e700065e
3
type-script-helper/.gitignore
vendored
3
type-script-helper/.gitignore
vendored
@ -3,4 +3,5 @@
|
|||||||
*.vsix
|
*.vsix
|
||||||
dist
|
dist
|
||||||
node_modules
|
node_modules
|
||||||
out
|
out
|
||||||
|
src/*.js*
|
@ -150,3 +150,9 @@ None
|
|||||||
-----------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
- Wrap directory in quotes
|
- Wrap directory in quotes
|
||||||
|
|
||||||
|
## 1.7.0 Fri Aug 30 2024 11:13:09 GMT-0700 (Mountain Standard Time)
|
||||||
|
-----------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- Copy Syntax In Light Theme
|
||||||
|
- [Copy-Syntax-in-Light](https://github.com/Ahmed-Adel-Morsi/Copy-Syntax-in-Light)
|
||||||
|
@ -27,6 +27,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"commands": [
|
"commands": [
|
||||||
|
{
|
||||||
|
"category": "Helper",
|
||||||
|
"command": "copyHelper.copySyntaxInLight",
|
||||||
|
"title": "Copy Syntax In Light Theme"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"category": "Helper",
|
"category": "Helper",
|
||||||
"command": "open-in-new-window.open",
|
"command": "open-in-new-window.open",
|
||||||
@ -259,5 +264,5 @@
|
|||||||
"webpack": "webpack --config ./build/node-extension.webpack.config.js",
|
"webpack": "webpack --config ./build/node-extension.webpack.config.js",
|
||||||
"watch": "concurrently \"rollup -c -w\" \"webpack --watch --config ./build/node-extension.webpack.config.js\""
|
"watch": "concurrently \"rollup -c -w\" \"webpack --watch --config ./build/node-extension.webpack.config.js\""
|
||||||
},
|
},
|
||||||
"version": "1.6.4"
|
"version": "1.7.0"
|
||||||
}
|
}
|
||||||
|
37
type-script-helper/src/copyHelper.ts
Normal file
37
type-script-helper/src/copyHelper.ts
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import * as vscode from 'vscode';
|
||||||
|
|
||||||
|
async function copySyntaxInLightLogic(): Promise<any> {
|
||||||
|
try {
|
||||||
|
// Get the current configuration
|
||||||
|
const config = vscode.workspace.getConfiguration();
|
||||||
|
|
||||||
|
// Get the current color theme
|
||||||
|
const currentTheme = config.get("workbench.colorTheme");
|
||||||
|
|
||||||
|
// Set the color theme to "Default Light+"
|
||||||
|
await config.update(
|
||||||
|
"workbench.colorTheme",
|
||||||
|
"Default Light Modern",
|
||||||
|
vscode.ConfigurationTarget.Global
|
||||||
|
);
|
||||||
|
|
||||||
|
// Copy Selected Text
|
||||||
|
await vscode.commands.executeCommand(
|
||||||
|
"editor.action.clipboardCopyAction"
|
||||||
|
);
|
||||||
|
|
||||||
|
// Show success message
|
||||||
|
vscode.window.showInformationMessage("Text copied in Light Mode");
|
||||||
|
|
||||||
|
// Switch back to dark theme
|
||||||
|
await config.update(
|
||||||
|
"workbench.colorTheme",
|
||||||
|
currentTheme,
|
||||||
|
vscode.ConfigurationTarget.Global
|
||||||
|
);
|
||||||
|
} catch (error) {
|
||||||
|
vscode.window.showErrorMessage(`Error: ${error}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export const copySyntaxInLight = () => copySyntaxInLightLogic();
|
@ -1,6 +1,7 @@
|
|||||||
// The module 'vscode' contains the VS Code extensibility API
|
// The module 'vscode' contains the VS Code extensibility API
|
||||||
// Import the module and reference it with the alias vscode in your code below
|
// Import the module and reference it with the alias vscode in your code below
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
|
import * as copyHelper from './copyHelper';
|
||||||
import * as kanbanHelper from './kanbanHelper';
|
import * as kanbanHelper from './kanbanHelper';
|
||||||
import * as markdownHelper from './markdownHelper';
|
import * as markdownHelper from './markdownHelper';
|
||||||
import * as promiseLinesHelper from './promiseLinesHelper';
|
import * as promiseLinesHelper from './promiseLinesHelper';
|
||||||
@ -37,6 +38,7 @@ export async function activate(extensionContext: vscode.ExtensionContext) {
|
|||||||
// context.subscriptions.push(disposable);
|
// context.subscriptions.push(disposable);
|
||||||
|
|
||||||
const commands = [
|
const commands = [
|
||||||
|
vscode.commands.registerCommand("copyHelper.copySyntaxInLight", copyHelper.copySyntaxInLight),
|
||||||
vscode.commands.registerCommand("kanban.refreshBoth", () => { kanbanHelper.refreshBoth(extensionContext); }),
|
vscode.commands.registerCommand("kanban.refreshBoth", () => { kanbanHelper.refreshBoth(extensionContext); }),
|
||||||
vscode.commands.registerCommand("kanban.refreshSidebar", refreshSidebar),
|
vscode.commands.registerCommand("kanban.refreshSidebar", refreshSidebar),
|
||||||
vscode.commands.registerCommand("kanban.refreshWebView", () => { refreshWebView(extensionContext); }),
|
vscode.commands.registerCommand("kanban.refreshWebView", () => { refreshWebView(extensionContext); }),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user