Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ServerCapabilities as CPServerCapabilities
} from 'vscode-languageserver-protocol';
import {
ConfigurationParams,
ConfigurationRequest
} from 'vscode-languageserver-protocol';
import { format } from './modes/formatting';
import { pushAll } from './utils/arrays';
import * as path from 'path';
import * as url from 'url';
import uri from 'vscode-uri';
import * as nls from 'vscode-nls';
nls.config(process.env['VSCODE_NLS_CONFIG']);
// tslint:disable-next-line:no-namespace
namespace TagCloseRequest {
export const type: RequestType<
TextDocumentPositionParams,
string,
any,
any
> = new RequestType('html/tag');
}
// Create a connection for the server
const connection: IConnection = createConnection();
console.log = connection.console.log.bind(connection.console);
console.error = connection.console.error.bind(connection.console);
'use strict';
import * as vscode from 'vscode';
import * as fs from 'fs';
import * as path from 'path';
import * as dateFns from 'date-fns';
import * as nls from 'vscode-nls';
import * as os from 'os';
import { memoConfigure } from './memoConfigure';
const localize = nls.config(process.env.VSCODE_NLS_CONFIG)();
export class memoOpenFolder extends memoConfigure {
constructor() {
super();
// console.log('memoOpenFolder');
// console.log(this.memodir);
// console.log('vscode.Uri =', vscode.Uri.file(this.memodir));
}
/**
* Open Dir
*/
public OpenDir() {
this.readConfig();
let folderUrl = vscode.Uri.file(this.memodir);
vscode.commands.executeCommand("vscode.openFolder", folderUrl, true);
'use strict';
import * as vscode from 'vscode';
import * as cp from 'child_process';
import * as fs from 'fs';
import * as nls from 'vscode-nls';
import { memoConfigure } from './memoConfigure';
const localize = nls.config(process.env.VSCODE_NLS_CONFIG)();
export class memoOpenTypora extends memoConfigure {
constructor() {
super();
}
/**
* OpenTypora
*/
public OpenTypora() {
this.readConfig();
// memopath に設定されたコマンドが実行可能かチェック
console.log(this.memopath);
// memo-life-for-you.TyporaExecPath
'use strict';
import * as vscode from 'vscode';
import * as nls from 'vscode-nls';
import { memoConfigure } from './memoConfigure';
import * as chromeLauncher from 'chrome-launcher';
const localize = nls.config(process.env.VSCODE_NLS_CONFIG)();
export class memoOpenChrome extends memoConfigure {
constructor() {
super();
}
/**
* Open Chrome
*/
public async OpenChrome() {
this.readConfig();
// await vscode.commands.executeCommand('markdown.showPreviewToSide').then(() => {
// // await vscode.commands.executeCommand('markdown-preview-enhanced.openPreview').then(() => {
// setTimeout(() => { Ω
// vscode.commands.executeCommand('editor.action.webvieweditor.selectAll').then(() => {
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* ------------------------------------------------------------------------------------------ */
import * as nls from 'vscode-nls';
const localize = nls.config(process.env.VSCODE_NLS_CONFIG)();
import * as vscode from 'vscode';
import { sayByeCommand } from './command/sayBye';
export function activate(context: vscode.ExtensionContext) {
const helloCmd = vscode.commands.registerCommand('extension.sayHello', () => {
const message = localize('sayHello.text', 'Hello')
vscode.window.showInformationMessage(message);
});
const byeCmd = vscode.commands.registerCommand(
'extension.sayBye',
sayByeCommand
);
context.subscriptions.push(helloCmd, byeCmd);
'use strict';
import { ExtensionContext, workspace, window, Disposable, commands, Uri } from 'vscode';
import { findHg, Hg } from './hg';
import { Model } from './model';
import { MercurialSCMProvider } from './scmProvider';
import { CommandCenter } from './commands';
import { StatusBarCommands } from './statusbar';
import { HgContentProvider } from './contentProvider';
import { AutoIncomingOutgoing } from './autoinout';
import { MergeDecorator } from './merge';
import { Askpass } from './askpass';
import TelemetryReporter from 'vscode-extension-telemetry';
import * as nls from 'vscode-nls';
const localize = nls.config(process.env.VSCODE_NLS_CONFIG)();
async function init(context: ExtensionContext, disposables: Disposable[]): Promise {
const { name, version, aiKey } = require(context.asAbsolutePath('./package.json')) as { name: string, version: string, aiKey: string };
const telemetryReporter: TelemetryReporter = new TelemetryReporter(name, version, aiKey);
disposables.push(telemetryReporter);
const outputChannel = window.createOutputChannel('Hg');
disposables.push(outputChannel);
const config = workspace.getConfiguration('hg');
const enabled = config.get('enabled') === true;
const workspaceRootPath = workspace.rootPath;
const pathHint = workspace.getConfiguration('hg').get('path');
const info = await findHg(pathHint);
const askpass = new Askpass();
'use strict';
import * as vscode from 'vscode';
import * as fs from 'fs';
import * as path from 'path';
import * as dateFns from 'date-fns';
import * as nls from 'vscode-nls';
import * as os from 'os';
import { memoConfigure } from './memoConfigure';
const localize = nls.config(process.env.VSCODE_NLS_CONFIG)();
export class memoTodo extends memoConfigure {
constructor() {
super();
}
/**
* Todo.txt
*/
public Todo() {
this.readConfig();
let file: string = 'todo.txt'
let dateFormat = this.memoDateFormat;
"use strict";
/*---------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
const nls = require("vscode-nls");
const localize = nls.config(process.env.VSCODE_NLS_CONFIG)(__filename);
function runtimeNotFound(_runtime) {
return {
id: 2001,
format: localize(0, null, '{_runtime}'),
variables: { _runtime }
};
}
exports.runtimeNotFound = runtimeNotFound;
function cannotLaunchInTerminal(_error) {
return {
id: 2011,
format: localize(1, null, '{_error}'),
variables: { _error }
};
}
exports.cannotLaunchInTerminal = cannotLaunchInTerminal;
export function configureLocale(locale: string): void {
nls.config({ locale: locale });
getLocalizeCalls.forEach(eachCall => eachCall());
}
'use strict';
import * as vscode from 'vscode';
import * as fs from 'fs';
import * as path from 'path';
import * as randomEmoji from 'node-emoji';
import * as dateFns from 'date-fns';
import * as nls from 'vscode-nls';
import * as os from 'os';
import { items, memoConfigure } from './memoConfigure';
import * as clipboardy from 'clipboardy';
import * as Mustache from 'mustache';
const localize = nls.config(process.env.VSCODE_NLS_CONFIG)();
export class memoNew extends memoConfigure {
constructor() {
super();
}
/**
* New
*/
public New() {
this.readConfig();
let file: string;
let selectString: string = "";