Merge remote-tracking branch 'origin/master' into alex/semantic-exploration
This commit is contained in:
commit
15beb36ccf
17
.github/commands.yml
vendored
17
.github/commands.yml
vendored
|
@ -96,7 +96,7 @@
|
|||
{
|
||||
type: 'comment',
|
||||
name: 'confirmationPending',
|
||||
allowUsers: ['cleidigh', 'usernamehw'],
|
||||
allowUsers: ['cleidigh', 'usernamehw', 'gjsjohnmurray', 'IllusionMH'],
|
||||
action: 'updateLabels',
|
||||
addLabel: 'confirmation-pending',
|
||||
removeLabel: 'confirmed'
|
||||
|
@ -116,6 +116,14 @@
|
|||
addLabel: 'needs more info',
|
||||
comment: "Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines. Please take the time to review these and update the issue.\n\nHappy Coding!"
|
||||
},
|
||||
{
|
||||
type: 'label',
|
||||
name: '*needs more info',
|
||||
action: 'updateLabels',
|
||||
addLabel: 'needs more info',
|
||||
removeLabel: '*needs more info',
|
||||
comment: "Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines. Please take the time to review these and update the issue.\n\nHappy Coding!"
|
||||
},
|
||||
{
|
||||
type: 'comment',
|
||||
name: 'a11ymas',
|
||||
|
@ -123,5 +131,12 @@
|
|||
action: 'updateLabels',
|
||||
addLabel: 'a11ymas'
|
||||
},
|
||||
{
|
||||
type: 'label',
|
||||
name: '*needs more info',
|
||||
action: 'updateLabels',
|
||||
addLabel: 'needs more info',
|
||||
removeLabel: '*needs more info'
|
||||
},
|
||||
]
|
||||
}
|
||||
|
|
2
.yarnrc
2
.yarnrc
|
@ -1,3 +1,3 @@
|
|||
disturl "https://atom.io/download/electron"
|
||||
target "6.1.2"
|
||||
target "6.1.4"
|
||||
runtime "electron"
|
||||
|
|
|
@ -17,13 +17,46 @@ function getEnv(name: string): string {
|
|||
return result;
|
||||
}
|
||||
|
||||
interface Config {
|
||||
id: string;
|
||||
frozen: boolean;
|
||||
}
|
||||
|
||||
function createDefaultConfig(quality: string): Config {
|
||||
return {
|
||||
id: quality,
|
||||
frozen: false
|
||||
};
|
||||
}
|
||||
|
||||
async function getConfig(client: CosmosClient, quality: string): Promise<Config> {
|
||||
const query = `SELECT TOP 1 * FROM c WHERE c.id = "${quality}"`;
|
||||
|
||||
const res = await client.database('builds').container('config').items.query(query).fetchAll();
|
||||
|
||||
if (res.resources.length === 0) {
|
||||
return createDefaultConfig(quality);
|
||||
}
|
||||
|
||||
return res.resources[0] as Config;
|
||||
}
|
||||
|
||||
async function main(): Promise<void> {
|
||||
const commit = getEnv('BUILD_SOURCEVERSION');
|
||||
const quality = getEnv('VSCODE_QUALITY');
|
||||
|
||||
const client = new CosmosClient({ endpoint: process.env['AZURE_DOCUMENTDB_ENDPOINT']!, key: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
|
||||
const config = await getConfig(client, quality);
|
||||
|
||||
console.log('Quality config:', config);
|
||||
|
||||
if (config.frozen) {
|
||||
console.log(`Skipping release because quality ${quality} is frozen.`);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`Releasing build ${commit}...`);
|
||||
|
||||
const client = new CosmosClient({ endpoint: process.env['AZURE_DOCUMENTDB_ENDPOINT']!, key: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
|
||||
const scripts = client.database('builds').container(quality).scripts;
|
||||
await scripts.storedProcedure('releaseBuild').execute('', [commit]);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[
|
||||
{
|
||||
"name": "ms-vscode.node-debug",
|
||||
"version": "1.40.1",
|
||||
"version": "1.41.0",
|
||||
"repo": "https://github.com/Microsoft/vscode-node-debug",
|
||||
"metadata": {
|
||||
"id": "b6ded8fb-a0a0-4c1c-acbd-ab2a3bc995a6",
|
||||
|
@ -16,7 +16,7 @@
|
|||
},
|
||||
{
|
||||
"name": "ms-vscode.node-debug2",
|
||||
"version": "1.39.3",
|
||||
"version": "1.41.0",
|
||||
"repo": "https://github.com/Microsoft/vscode-node-debug2",
|
||||
"metadata": {
|
||||
"id": "36d19e17-7569-4841-a001-947eb18602b2",
|
||||
|
@ -31,7 +31,7 @@
|
|||
},
|
||||
{
|
||||
"name": "ms-vscode.references-view",
|
||||
"version": "0.0.31",
|
||||
"version": "0.0.36",
|
||||
"repo": "https://github.com/Microsoft/vscode-reference-view",
|
||||
"metadata": {
|
||||
"id": "dc489f46-520d-4556-ae85-1f9eab3c412d",
|
||||
|
|
|
@ -57,7 +57,6 @@ var BUNDLED_FILE_HEADER = [
|
|||
const languages = i18n.defaultLanguages.concat([]); // i18n.defaultLanguages.concat(process.env.VSCODE_QUALITY !== 'stable' ? i18n.extraLanguages : []);
|
||||
|
||||
const extractEditorSrcTask = task.define('extract-editor-src', () => {
|
||||
console.log(`If the build fails, consider tweaking shakeLevel below to a lower value.`);
|
||||
const apiusages = monacoapi.execute().usageContent;
|
||||
const extrausages = fs.readFileSync(path.join(root, 'build', 'monaco', 'monaco.usage.recipe')).toString();
|
||||
standalone.extractEditor({
|
||||
|
@ -71,14 +70,6 @@ const extractEditorSrcTask = task.define('extract-editor-src', () => {
|
|||
apiusages,
|
||||
extrausages
|
||||
],
|
||||
typings: [
|
||||
'typings/lib.ie11_safe_es6.d.ts',
|
||||
'typings/thenable.d.ts',
|
||||
'typings/es6-promise.d.ts',
|
||||
'typings/require-monaco.d.ts',
|
||||
"typings/lib.es2018.promise.d.ts",
|
||||
'vs/monaco.d.ts'
|
||||
],
|
||||
libs: [
|
||||
`lib.es5.d.ts`,
|
||||
`lib.dom.d.ts`,
|
||||
|
@ -138,18 +129,70 @@ const createESMSourcesAndResourcesTask = task.define('extract-editor-esm', () =>
|
|||
});
|
||||
|
||||
const compileEditorESMTask = task.define('compile-editor-esm', () => {
|
||||
console.log(`Launching the TS compiler at ${path.join(__dirname, '../out-editor-esm')}...`);
|
||||
let result;
|
||||
if (process.platform === 'win32') {
|
||||
const result = cp.spawnSync(`..\\node_modules\\.bin\\tsc.cmd`, {
|
||||
result = cp.spawnSync(`..\\node_modules\\.bin\\tsc.cmd`, {
|
||||
cwd: path.join(__dirname, '../out-editor-esm')
|
||||
});
|
||||
console.log(result.stdout.toString());
|
||||
console.log(result.stderr.toString());
|
||||
} else {
|
||||
const result = cp.spawnSync(`node`, [`../node_modules/.bin/tsc`], {
|
||||
result = cp.spawnSync(`node`, [`../node_modules/.bin/tsc`], {
|
||||
cwd: path.join(__dirname, '../out-editor-esm')
|
||||
});
|
||||
console.log(result.stdout.toString());
|
||||
console.log(result.stderr.toString());
|
||||
}
|
||||
|
||||
console.log(result.stdout.toString());
|
||||
console.log(result.stderr.toString());
|
||||
|
||||
if (result.status !== 0) {
|
||||
console.log(`The TS Compilation failed, preparing analysis folder...`);
|
||||
const destPath = path.join(__dirname, '../../vscode-monaco-editor-esm-analysis');
|
||||
return util.rimraf(destPath)().then(() => {
|
||||
fs.mkdirSync(destPath);
|
||||
|
||||
// initialize a new repository
|
||||
cp.spawnSync(`git`, [`init`], {
|
||||
cwd: destPath
|
||||
});
|
||||
|
||||
// build a list of files to copy
|
||||
const files = util.rreddir(path.join(__dirname, '../out-editor-esm'));
|
||||
|
||||
// copy files from src
|
||||
for (const file of files) {
|
||||
const srcFilePath = path.join(__dirname, '../src', file);
|
||||
const dstFilePath = path.join(destPath, file);
|
||||
if (fs.existsSync(srcFilePath)) {
|
||||
util.ensureDir(path.dirname(dstFilePath));
|
||||
const contents = fs.readFileSync(srcFilePath).toString().replace(/\r\n|\r|\n/g, '\n');
|
||||
fs.writeFileSync(dstFilePath, contents);
|
||||
}
|
||||
}
|
||||
|
||||
// create an initial commit to diff against
|
||||
cp.spawnSync(`git`, [`add`, `.`], {
|
||||
cwd: destPath
|
||||
});
|
||||
|
||||
// create the commit
|
||||
cp.spawnSync(`git`, [`commit`, `-m`, `"original sources"`, `--no-gpg-sign`], {
|
||||
cwd: destPath
|
||||
});
|
||||
|
||||
// copy files from esm
|
||||
for (const file of files) {
|
||||
const srcFilePath = path.join(__dirname, '../out-editor-esm', file);
|
||||
const dstFilePath = path.join(destPath, file);
|
||||
if (fs.existsSync(srcFilePath)) {
|
||||
util.ensureDir(path.dirname(dstFilePath));
|
||||
const contents = fs.readFileSync(srcFilePath).toString().replace(/\r\n|\r|\n/g, '\n');
|
||||
fs.writeFileSync(dstFilePath, contents);
|
||||
}
|
||||
}
|
||||
|
||||
console.log(`Open in VS Code the folder at '${destPath}' and you can alayze the compilation error`);
|
||||
throw new Error('Standalone Editor compilation failed. If this is the build machine, simply launch `yarn run gulp editor-distro` on your machine to further analyze the compilation problem.');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -20,6 +20,13 @@ const ansiColors = require('ansi-colors');
|
|||
const root = path.dirname(path.dirname(__dirname));
|
||||
const builtInExtensions = require('../builtInExtensions.json');
|
||||
const controlFilePath = path.join(os.homedir(), '.vscode-oss-dev', 'extensions', 'control.json');
|
||||
const ENABLE_LOGGING = !process.env['VSCODE_BUILD_BUILTIN_EXTENSIONS_SILENCE_PLEASE'];
|
||||
|
||||
function log() {
|
||||
if (ENABLE_LOGGING) {
|
||||
fancyLog.apply(this, arguments);
|
||||
}
|
||||
}
|
||||
|
||||
function getExtensionPath(extension) {
|
||||
return path.join(root, '.build', 'builtInExtensions', extension.name);
|
||||
|
@ -44,7 +51,7 @@ function isUpToDate(extension) {
|
|||
|
||||
function syncMarketplaceExtension(extension) {
|
||||
if (isUpToDate(extension)) {
|
||||
fancyLog(ansiColors.blue('[marketplace]'), `${extension.name}@${extension.version}`, ansiColors.green('✔︎'));
|
||||
log(ansiColors.blue('[marketplace]'), `${extension.name}@${extension.version}`, ansiColors.green('✔︎'));
|
||||
return es.readArray([]);
|
||||
}
|
||||
|
||||
|
@ -53,13 +60,13 @@ function syncMarketplaceExtension(extension) {
|
|||
return ext.fromMarketplace(extension.name, extension.version, extension.metadata)
|
||||
.pipe(rename(p => p.dirname = `${extension.name}/${p.dirname}`))
|
||||
.pipe(vfs.dest('.build/builtInExtensions'))
|
||||
.on('end', () => fancyLog(ansiColors.blue('[marketplace]'), extension.name, ansiColors.green('✔︎')));
|
||||
.on('end', () => log(ansiColors.blue('[marketplace]'), extension.name, ansiColors.green('✔︎')));
|
||||
}
|
||||
|
||||
function syncExtension(extension, controlState) {
|
||||
switch (controlState) {
|
||||
case 'disabled':
|
||||
fancyLog(ansiColors.blue('[disabled]'), ansiColors.gray(extension.name));
|
||||
log(ansiColors.blue('[disabled]'), ansiColors.gray(extension.name));
|
||||
return es.readArray([]);
|
||||
|
||||
case 'marketplace':
|
||||
|
@ -67,15 +74,15 @@ function syncExtension(extension, controlState) {
|
|||
|
||||
default:
|
||||
if (!fs.existsSync(controlState)) {
|
||||
fancyLog(ansiColors.red(`Error: Built-in extension '${extension.name}' is configured to run from '${controlState}' but that path does not exist.`));
|
||||
log(ansiColors.red(`Error: Built-in extension '${extension.name}' is configured to run from '${controlState}' but that path does not exist.`));
|
||||
return es.readArray([]);
|
||||
|
||||
} else if (!fs.existsSync(path.join(controlState, 'package.json'))) {
|
||||
fancyLog(ansiColors.red(`Error: Built-in extension '${extension.name}' is configured to run from '${controlState}' but there is no 'package.json' file in that directory.`));
|
||||
log(ansiColors.red(`Error: Built-in extension '${extension.name}' is configured to run from '${controlState}' but there is no 'package.json' file in that directory.`));
|
||||
return es.readArray([]);
|
||||
}
|
||||
|
||||
fancyLog(ansiColors.blue('[local]'), `${extension.name}: ${ansiColors.cyan(controlState)}`, ansiColors.green('✔︎'));
|
||||
log(ansiColors.blue('[local]'), `${extension.name}: ${ansiColors.cyan(controlState)}`, ansiColors.green('✔︎'));
|
||||
return es.readArray([]);
|
||||
}
|
||||
}
|
||||
|
@ -94,8 +101,8 @@ function writeControlFile(control) {
|
|||
}
|
||||
|
||||
function main() {
|
||||
fancyLog('Syncronizing built-in extensions...');
|
||||
fancyLog(`You can manage built-in extensions with the ${ansiColors.cyan('--builtin')} flag`);
|
||||
log('Syncronizing built-in extensions...');
|
||||
log(`You can manage built-in extensions with the ${ansiColors.cyan('--builtin')} flag`);
|
||||
|
||||
const control = readControlFile();
|
||||
const streams = [];
|
||||
|
|
|
@ -44,7 +44,7 @@ function createCompile(src, build, emitError) {
|
|||
const input = es.through();
|
||||
const output = input
|
||||
.pipe(utf8Filter)
|
||||
.pipe(bom())
|
||||
.pipe(bom()) // this is required to preserve BOM in test files that loose it otherwise
|
||||
.pipe(utf8Filter.restore)
|
||||
.pipe(tsFilter)
|
||||
.pipe(util.loadSourcemaps())
|
||||
|
|
|
@ -54,7 +54,7 @@ function createCompile(src: string, build: boolean, emitError?: boolean) {
|
|||
const input = es.through();
|
||||
const output = input
|
||||
.pipe(utf8Filter)
|
||||
.pipe(bom())
|
||||
.pipe(bom()) // this is required to preserve BOM in test files that loose it otherwise
|
||||
.pipe(utf8Filter.restore)
|
||||
.pipe(tsFilter)
|
||||
.pipe(util.loadSourcemaps())
|
||||
|
|
|
@ -42,10 +42,18 @@
|
|||
"name": "vs/workbench/contrib/callHierarchy",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/contrib/codeActions",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/contrib/comments",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/contrib/testCustomEditors",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/contrib/debug",
|
||||
"project": "vscode-workbench"
|
||||
|
@ -135,7 +143,7 @@
|
|||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/contrib/stats",
|
||||
"name": "vs/workbench/contrib/tags",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
|
@ -194,6 +202,10 @@
|
|||
"name": "vs/workbench/services/actions",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/services/authToken",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/services/bulkEdit",
|
||||
"project": "vscode-workbench"
|
||||
|
|
|
@ -43,7 +43,9 @@ function extractEditor(options) {
|
|||
compilerOptions.declaration = false;
|
||||
compilerOptions.moduleResolution = ts.ModuleResolutionKind.Classic;
|
||||
options.compilerOptions = compilerOptions;
|
||||
console.log(`Running with shakeLevel ${tss.toStringShakeLevel(options.shakeLevel)}`);
|
||||
console.log(`Running tree shaker with shakeLevel ${tss.toStringShakeLevel(options.shakeLevel)}`);
|
||||
// Take the extra included .d.ts files from `tsconfig.monaco.json`
|
||||
options.typings = tsConfig.include.filter(includedFile => /\.d\.ts$/.test(includedFile));
|
||||
let result = tss.shake(options);
|
||||
for (let fileName in result) {
|
||||
if (result.hasOwnProperty(fileName)) {
|
||||
|
|
|
@ -50,7 +50,10 @@ export function extractEditor(options: tss.ITreeShakingOptions & { destRoot: str
|
|||
|
||||
options.compilerOptions = compilerOptions;
|
||||
|
||||
console.log(`Running with shakeLevel ${tss.toStringShakeLevel(options.shakeLevel)}`);
|
||||
console.log(`Running tree shaker with shakeLevel ${tss.toStringShakeLevel(options.shakeLevel)}`);
|
||||
|
||||
// Take the extra included .d.ts files from `tsconfig.monaco.json`
|
||||
options.typings = (<string[]>tsConfig.include).filter(includedFile => /\.d\.ts$/.test(includedFile));
|
||||
|
||||
let result = tss.shake(options);
|
||||
for (let fileName in result) {
|
||||
|
|
|
@ -25,17 +25,17 @@ function toStringShakeLevel(shakeLevel) {
|
|||
}
|
||||
}
|
||||
exports.toStringShakeLevel = toStringShakeLevel;
|
||||
function printDiagnostics(diagnostics) {
|
||||
function printDiagnostics(options, diagnostics) {
|
||||
for (const diag of diagnostics) {
|
||||
let result = '';
|
||||
if (diag.file) {
|
||||
result += `${diag.file.fileName}: `;
|
||||
result += `${path.join(options.sourcesRoot, diag.file.fileName)}`;
|
||||
}
|
||||
if (diag.file && diag.start) {
|
||||
let location = diag.file.getLineAndCharacterOfPosition(diag.start);
|
||||
result += `- ${location.line + 1},${location.character} - `;
|
||||
result += `:${location.line + 1}:${location.character}`;
|
||||
}
|
||||
result += JSON.stringify(diag.messageText);
|
||||
result += ` - ` + JSON.stringify(diag.messageText);
|
||||
console.log(result);
|
||||
}
|
||||
}
|
||||
|
@ -44,17 +44,17 @@ function shake(options) {
|
|||
const program = languageService.getProgram();
|
||||
const globalDiagnostics = program.getGlobalDiagnostics();
|
||||
if (globalDiagnostics.length > 0) {
|
||||
printDiagnostics(globalDiagnostics);
|
||||
printDiagnostics(options, globalDiagnostics);
|
||||
throw new Error(`Compilation Errors encountered.`);
|
||||
}
|
||||
const syntacticDiagnostics = program.getSyntacticDiagnostics();
|
||||
if (syntacticDiagnostics.length > 0) {
|
||||
printDiagnostics(syntacticDiagnostics);
|
||||
printDiagnostics(options, syntacticDiagnostics);
|
||||
throw new Error(`Compilation Errors encountered.`);
|
||||
}
|
||||
const semanticDiagnostics = program.getSemanticDiagnostics();
|
||||
if (semanticDiagnostics.length > 0) {
|
||||
printDiagnostics(semanticDiagnostics);
|
||||
printDiagnostics(options, semanticDiagnostics);
|
||||
throw new Error(`Compilation Errors encountered.`);
|
||||
}
|
||||
markNodes(languageService, options);
|
||||
|
@ -358,7 +358,7 @@ function markNodes(languageService, options) {
|
|||
++step;
|
||||
let node;
|
||||
if (step % 100 === 0) {
|
||||
console.log(`${step}/${step + black_queue.length + gray_queue.length} (${black_queue.length}, ${gray_queue.length})`);
|
||||
console.log(`Treeshaking - ${Math.floor(100 * step / (step + black_queue.length + gray_queue.length))}% - ${step}/${step + black_queue.length + gray_queue.length} (${black_queue.length}, ${gray_queue.length})`);
|
||||
}
|
||||
if (black_queue.length === 0) {
|
||||
for (let i = 0; i < gray_queue.length; i++) {
|
||||
|
|
|
@ -71,17 +71,17 @@ export interface ITreeShakingResult {
|
|||
[file: string]: string;
|
||||
}
|
||||
|
||||
function printDiagnostics(diagnostics: ReadonlyArray<ts.Diagnostic>): void {
|
||||
function printDiagnostics(options: ITreeShakingOptions, diagnostics: ReadonlyArray<ts.Diagnostic>): void {
|
||||
for (const diag of diagnostics) {
|
||||
let result = '';
|
||||
if (diag.file) {
|
||||
result += `${diag.file.fileName}: `;
|
||||
result += `${path.join(options.sourcesRoot, diag.file.fileName)}`;
|
||||
}
|
||||
if (diag.file && diag.start) {
|
||||
let location = diag.file.getLineAndCharacterOfPosition(diag.start);
|
||||
result += `- ${location.line + 1},${location.character} - `;
|
||||
result += `:${location.line + 1}:${location.character}`;
|
||||
}
|
||||
result += JSON.stringify(diag.messageText);
|
||||
result += ` - ` + JSON.stringify(diag.messageText);
|
||||
console.log(result);
|
||||
}
|
||||
}
|
||||
|
@ -92,19 +92,19 @@ export function shake(options: ITreeShakingOptions): ITreeShakingResult {
|
|||
|
||||
const globalDiagnostics = program.getGlobalDiagnostics();
|
||||
if (globalDiagnostics.length > 0) {
|
||||
printDiagnostics(globalDiagnostics);
|
||||
printDiagnostics(options, globalDiagnostics);
|
||||
throw new Error(`Compilation Errors encountered.`);
|
||||
}
|
||||
|
||||
const syntacticDiagnostics = program.getSyntacticDiagnostics();
|
||||
if (syntacticDiagnostics.length > 0) {
|
||||
printDiagnostics(syntacticDiagnostics);
|
||||
printDiagnostics(options, syntacticDiagnostics);
|
||||
throw new Error(`Compilation Errors encountered.`);
|
||||
}
|
||||
|
||||
const semanticDiagnostics = program.getSemanticDiagnostics();
|
||||
if (semanticDiagnostics.length > 0) {
|
||||
printDiagnostics(semanticDiagnostics);
|
||||
printDiagnostics(options, semanticDiagnostics);
|
||||
throw new Error(`Compilation Errors encountered.`);
|
||||
}
|
||||
|
||||
|
@ -471,7 +471,7 @@ function markNodes(languageService: ts.LanguageService, options: ITreeShakingOpt
|
|||
let node: ts.Node;
|
||||
|
||||
if (step % 100 === 0) {
|
||||
console.log(`${step}/${step + black_queue.length + gray_queue.length} (${black_queue.length}, ${gray_queue.length})`);
|
||||
console.log(`Treeshaking - ${Math.floor(100 * step / (step + black_queue.length + gray_queue.length))}% - ${step}/${step + black_queue.length + gray_queue.length} (${black_queue.length}, ${gray_queue.length})`);
|
||||
}
|
||||
|
||||
if (black_queue.length === 0) {
|
||||
|
|
|
@ -185,6 +185,31 @@ function rimraf(dir) {
|
|||
return result;
|
||||
}
|
||||
exports.rimraf = rimraf;
|
||||
function _rreaddir(dirPath, prepend, result) {
|
||||
const entries = fs.readdirSync(dirPath, { withFileTypes: true });
|
||||
for (const entry of entries) {
|
||||
if (entry.isDirectory()) {
|
||||
_rreaddir(path.join(dirPath, entry.name), `${prepend}/${entry.name}`, result);
|
||||
}
|
||||
else {
|
||||
result.push(`${prepend}/${entry.name}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
function rreddir(dirPath) {
|
||||
let result = [];
|
||||
_rreaddir(dirPath, '', result);
|
||||
return result;
|
||||
}
|
||||
exports.rreddir = rreddir;
|
||||
function ensureDir(dirPath) {
|
||||
if (fs.existsSync(dirPath)) {
|
||||
return;
|
||||
}
|
||||
ensureDir(path.dirname(dirPath));
|
||||
fs.mkdirSync(dirPath);
|
||||
}
|
||||
exports.ensureDir = ensureDir;
|
||||
function getVersion(root) {
|
||||
let version = process.env['BUILD_SOURCEVERSION'];
|
||||
if (!version || !/^[0-9a-f]{40}$/i.test(version)) {
|
||||
|
|
|
@ -243,6 +243,31 @@ export function rimraf(dir: string): () => Promise<void> {
|
|||
return result;
|
||||
}
|
||||
|
||||
function _rreaddir(dirPath: string, prepend: string, result: string[]): void {
|
||||
const entries = fs.readdirSync(dirPath, { withFileTypes: true });
|
||||
for (const entry of entries) {
|
||||
if (entry.isDirectory()) {
|
||||
_rreaddir(path.join(dirPath, entry.name), `${prepend}/${entry.name}`, result);
|
||||
} else {
|
||||
result.push(`${prepend}/${entry.name}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function rreddir(dirPath: string): string[] {
|
||||
let result: string[] = [];
|
||||
_rreaddir(dirPath, '', result);
|
||||
return result;
|
||||
}
|
||||
|
||||
export function ensureDir(dirPath: string): void {
|
||||
if (fs.existsSync(dirPath)) {
|
||||
return;
|
||||
}
|
||||
ensureDir(path.dirname(dirPath));
|
||||
fs.mkdirSync(dirPath);
|
||||
}
|
||||
|
||||
export function getVersion(root: string): string | undefined {
|
||||
let version = process.env['BUILD_SOURCEVERSION'];
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ declare namespace monaco {
|
|||
}
|
||||
|
||||
declare namespace monaco.editor {
|
||||
|
||||
#include(vs/editor/browser/widget/diffNavigator): IDiffNavigator
|
||||
#includeAll(vs/editor/standalone/browser/standaloneEditor;modes.=>languages.;editorCommon.=>):
|
||||
#include(vs/editor/standalone/common/standaloneThemeService): BuiltinTheme, IStandaloneThemeData, IColors
|
||||
#include(vs/editor/common/modes/supports/tokenization): ITokenThemeRule
|
||||
|
|
|
@ -2,38 +2,17 @@
|
|||
// This file is adding references to various symbols which should not be removed via tree shaking
|
||||
|
||||
import { ServiceIdentifier } from './vs/platform/instantiation/common/instantiation';
|
||||
import { IContextViewService } from './vs/platform/contextview/browser/contextView';
|
||||
import { IHighlight } from './vs/base/parts/quickopen/browser/quickOpenModel';
|
||||
import { IWorkspaceContextService } from './vs/platform/workspace/common/workspace';
|
||||
import { IEnvironmentService } from './vs/platform/environment/common/environment';
|
||||
import { CountBadge } from './vs/base/browser/ui/countBadge/countBadge';
|
||||
import { SimpleWorkerClient, create as create1 } from './vs/base/common/worker/simpleWorker';
|
||||
import { create as create1 } from './vs/base/common/worker/simpleWorker';
|
||||
import { create as create2 } from './vs/editor/common/services/editorSimpleWorker';
|
||||
import { QuickOpenWidget } from './vs/base/parts/quickopen/browser/quickOpenWidget';
|
||||
import { WorkbenchAsyncDataTree } from './vs/platform/list/browser/listService';
|
||||
import { SyncDescriptor0, SyncDescriptor1, SyncDescriptor2, SyncDescriptor3, SyncDescriptor4, SyncDescriptor5, SyncDescriptor6, SyncDescriptor7, SyncDescriptor8 } from './vs/platform/instantiation/common/descriptors';
|
||||
import { DiffNavigator } from './vs/editor/browser/widget/diffNavigator';
|
||||
import { DocumentRangeFormattingEditProvider } from './vs/editor/common/modes';
|
||||
import * as editorAPI from './vs/editor/editor.api';
|
||||
|
||||
(function () {
|
||||
var a: any;
|
||||
var b: any;
|
||||
a = (<IContextViewService>b).layout; // IContextViewProvider
|
||||
a = (<IWorkspaceContextService>b).getWorkspaceFolder; // IWorkspaceFolderProvider
|
||||
a = (<IWorkspaceContextService>b).getWorkspace; // IWorkspaceFolderProvider
|
||||
a = (<CountBadge>b).style; // IThemable
|
||||
a = (<QuickOpenWidget>b).style; // IThemable
|
||||
a = (<WorkbenchAsyncDataTree<any,any>>b).style; // IThemable
|
||||
a = (<IEnvironmentService>b).userHome; // IUserHomeProvider
|
||||
a = (<DiffNavigator>b).previous; // IDiffNavigator
|
||||
a = (<ServiceIdentifier<any>>b).type;
|
||||
a = (<IHighlight>b).start;
|
||||
a = (<IHighlight>b).end;
|
||||
a = (<SimpleWorkerClient<any, any>>b).getProxyObject; // IWorkerClient
|
||||
a = create1;
|
||||
a = create2;
|
||||
a = (<DocumentRangeFormattingEditProvider>b).extensionId;
|
||||
|
||||
// injection madness
|
||||
a = (<SyncDescriptor0<any>>b).ctor;
|
||||
|
|
|
@ -73,10 +73,3 @@ yarnInstall(`build`); // node modules required for build
|
|||
yarnInstall('test/automation'); // node modules required for smoketest
|
||||
yarnInstall('test/smoke'); // node modules required for smoketest
|
||||
yarnInstallBuildDependencies(); // node modules for watching, specific to host node version, not electron
|
||||
|
||||
// Remove the windows process tree typings as this causes duplicate identifier errors in tsc builds
|
||||
const processTreeDts = path.join('node_modules', 'windows-process-tree', 'typings', 'windows-process-tree.d.ts');
|
||||
if (fs.existsSync(processTreeDts)) {
|
||||
console.log('Removing windows-process-tree.d.ts');
|
||||
fs.unlinkSync(processTreeDts);
|
||||
}
|
||||
|
|
|
@ -957,10 +957,10 @@ Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\Applications\{#ExeBas
|
|||
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\Applications\{#ExeBasename}.exe\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\resources\app\resources\win32\default.ico"
|
||||
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\Applications\{#ExeBasename}.exe\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#ExeBasename}.exe"" ""%1"""
|
||||
|
||||
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\*\shell\{#RegValueName}"; ValueType: expandsz; ValueName: ""; ValueData: "Open w&ith {#ShellNameShort}"; Tasks: addcontextmenufiles; Flags: uninsdeletekey
|
||||
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\*\shell\{#RegValueName}"; ValueType: expandsz; ValueName: ""; ValueData: "{cm:OpenWithCodeContextMenu, {#ShellNameShort}}"; Tasks: addcontextmenufiles; Flags: uninsdeletekey
|
||||
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\*\shell\{#RegValueName}"; ValueType: expandsz; ValueName: "Icon"; ValueData: "{app}\{#ExeBasename}.exe"; Tasks: addcontextmenufiles
|
||||
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\*\shell\{#RegValueName}\command"; ValueType: expandsz; ValueName: ""; ValueData: """{app}\{#ExeBasename}.exe"" ""%1"""; Tasks: addcontextmenufiles
|
||||
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\directory\shell\{#RegValueName}"; ValueType: expandsz; ValueName: ""; ValueData: "Open w&ith {#ShellNameShort}"; Tasks: addcontextmenufolders; Flags: uninsdeletekey
|
||||
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\directory\shell\{#RegValueName}"; ValueType: expandsz; ValueName: ""; ValueData: "{cm:OpenWithCodeContextMenu, {#ShellNameShort}}"; Tasks: addcontextmenufolders; Flags: uninsdeletekey
|
||||
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\directory\shell\{#RegValueName}"; ValueType: expandsz; ValueName: "Icon"; ValueData: "{app}\{#ExeBasename}.exe"; Tasks: addcontextmenufolders
|
||||
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\directory\shell\{#RegValueName}\command"; ValueType: expandsz; ValueName: ""; ValueData: """{app}\{#ExeBasename}.exe"" ""%V"""; Tasks: addcontextmenufolders
|
||||
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\directory\background\shell\{#RegValueName}"; ValueType: expandsz; ValueName: ""; ValueData: "Open w&ith {#ShellNameShort}"; Tasks: addcontextmenufolders; Flags: uninsdeletekey
|
||||
|
|
|
@ -5,4 +5,5 @@ AssociateWithFiles=%1 als Editor f
|
|||
AddToPath=Zu PATH hinzufügen (nach dem Neustart verfügbar)
|
||||
RunAfter=%1 nach der Installation ausführen
|
||||
Other=Andere:
|
||||
SourceFile=%1-Quelldatei
|
||||
SourceFile=%1-Quelldatei
|
||||
OpenWithCodeContextMenu=Mit %1 öffnen
|
|
@ -5,4 +5,5 @@ AssociateWithFiles=Register %1 as an editor for supported file types
|
|||
AddToPath=Add to PATH (requires shell restart)
|
||||
RunAfter=Run %1 after installation
|
||||
Other=Other:
|
||||
SourceFile=%1 Source File
|
||||
SourceFile=%1 Source File
|
||||
OpenWithCodeContextMenu=Open with %1
|
|
@ -5,4 +5,5 @@ AssociateWithFiles=Registrar %1 como editor para tipos de archivo admitidos
|
|||
AddToPath=Agregar a PATH (disponible después de reiniciar)
|
||||
RunAfter=Ejecutar %1 después de la instalación
|
||||
Other=Otros:
|
||||
SourceFile=Archivo de origen %1
|
||||
SourceFile=Archivo de origen %1
|
||||
OpenWithCodeContextMenu=Abrir con %1
|
|
@ -5,4 +5,5 @@ AssociateWithFiles=Inscrire %1 en tant qu'
|
|||
AddToPath=Ajouter à PATH (disponible après le redémarrage)
|
||||
RunAfter=Exécuter %1 après l'installation
|
||||
Other=Autre :
|
||||
SourceFile=Fichier source %1
|
||||
SourceFile=Fichier source %1
|
||||
OpenWithCodeContextMenu=Ouvrir avec %1
|
|
@ -5,4 +5,5 @@ AssociateWithFiles=%1 regisztr
|
|||
AddToPath=Hozzáadás a PATH-hoz (újraindítás után lesz elérhető)
|
||||
RunAfter=%1 indítása a telepítés után
|
||||
Other=Egyéb:
|
||||
SourceFile=%1 forrásfájl
|
||||
SourceFile=%1 forrásfájl
|
||||
OpenWithCodeContextMenu=Megnyitás a következővel: %1
|
|
@ -5,4 +5,5 @@ AssociateWithFiles=Registra %1 come editor per i tipi di file supportati
|
|||
AddToPath=Aggiungi a PATH (disponibile dopo il riavvio)
|
||||
RunAfter=Esegui %1 dopo l'installazione
|
||||
Other=Altro:
|
||||
SourceFile=File di origine %1
|
||||
SourceFile=File di origine %1
|
||||
OpenWithCodeContextMenu=Apri con %1
|
|
@ -5,4 +5,5 @@ AssociateWithFiles=
|
|||
AddToPath=PATH への追加(再起動後に使用可能)
|
||||
RunAfter=インストール後に %1 を実行する
|
||||
Other=その他:
|
||||
SourceFile=%1 ソース ファイル
|
||||
SourceFile=%1 ソース ファイル
|
||||
OpenWithCodeContextMenu=%1 で開く
|
|
@ -5,4 +5,5 @@ AssociateWithFiles=%1
|
|||
AddToPath=PATH에 추가(다시 시작한 후 사용 가능)
|
||||
RunAfter=설치 후 %1 실행
|
||||
Other=기타:
|
||||
SourceFile=%1 원본 파일
|
||||
SourceFile=%1 원본 파일
|
||||
OpenWithCodeContextMenu=%1(으)로 열기
|
|
@ -5,4 +5,5 @@ AssociateWithFiles=Registre %1 como um editor para tipos de arquivos suportados
|
|||
AddToPath=Adicione em PATH (disponível após reiniciar)
|
||||
RunAfter=Executar %1 após a instalação
|
||||
Other=Outros:
|
||||
SourceFile=Arquivo Fonte %1
|
||||
SourceFile=Arquivo Fonte %1
|
||||
OpenWithCodeContextMenu=Abrir com %1
|
|
@ -5,4 +5,5 @@ AssociateWithFiles=
|
|||
AddToPath=Добавить в PATH (доступно после перезагрузки)
|
||||
RunAfter=Запустить %1 после установки
|
||||
Other=Другое:
|
||||
SourceFile=Èñõîäíûé ôàéë %1
|
||||
SourceFile=Èñõîäíûé ôàéë %1
|
||||
OpenWithCodeContextMenu=Îòêðûòü ñ ïîìîùüþ %1
|
|
@ -5,4 +5,5 @@ AssociateWithFiles=%1 uygulamas
|
|||
AddToPath=PATH'e ekle (yeniden başlattıktan sonra kullanılabilir)
|
||||
RunAfter=Kurulumdan sonra %1 uygulamasını çalıştır.
|
||||
Other=Diğer:
|
||||
SourceFile=%1 Kaynak Dosyası
|
||||
SourceFile=%1 Kaynak Dosyası
|
||||
OpenWithCodeContextMenu=%1 İle Aç
|
|
@ -5,4 +5,5 @@ AssociateWithFiles=
|
|||
AddToPath=添加到 PATH (重启后生效)
|
||||
RunAfter=安装后运行 %1
|
||||
Other=其他:
|
||||
SourceFile=%1 源文件
|
||||
SourceFile=%1 源文件
|
||||
OpenWithCodeContextMenu=通过 %1 打开
|
|
@ -5,4 +5,5 @@ AssociateWithFiles=
|
|||
AddToPath=加入 PATH 中 (重新啟動後生效)
|
||||
RunAfter=安裝後執行 %1
|
||||
Other=其他:
|
||||
SourceFile=%1 ㄓ方郎<E696B9>
|
||||
SourceFile=%1 來源檔案
|
||||
OpenWithCodeContextMenu=以 %1 開啟
|
|
@ -60,12 +60,12 @@
|
|||
"git": {
|
||||
"name": "electron",
|
||||
"repositoryUrl": "https://github.com/electron/electron",
|
||||
"commitHash": "dabaa7557a165cc107f89fd7c3e3c3210f9b5758"
|
||||
"commitHash": "a5b474e8248803f54efc2c2c724c3322590c4fda"
|
||||
}
|
||||
},
|
||||
"isOnlyProductionDependency": true,
|
||||
"license": "MIT",
|
||||
"version": "6.1.2"
|
||||
"version": "6.1.4"
|
||||
},
|
||||
{
|
||||
"component": {
|
||||
|
@ -98,7 +98,7 @@
|
|||
"git": {
|
||||
"name": "vscode-codicons",
|
||||
"repositoryUrl": "https://github.com/microsoft/vscode-codicons",
|
||||
"commitHash": "1f8534396cda86d3fa199b0e45ce110b55d794d0"
|
||||
"commitHash": "65d11e0839d0ce09faa1a159dc0b3c0bd1aa50be"
|
||||
}
|
||||
},
|
||||
"license": "MIT and Creative Commons Attribution 4.0",
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
"git": {
|
||||
"name": "jeff-hykin/cpp-textmate-grammar",
|
||||
"repositoryUrl": "https://github.com/jeff-hykin/cpp-textmate-grammar",
|
||||
"commitHash": "d937b80a19706d518e5fe52357d7c50d34a26e60"
|
||||
"commitHash": "fedd206d1b2803f31a278e9b5f098ce4bc76e532"
|
||||
}
|
||||
},
|
||||
"license": "MIT",
|
||||
"version": "1.14.11",
|
||||
"version": "1.14.13",
|
||||
"description": "The files syntaxes/c.json and syntaxes/c++.json were derived from https://github.com/atom/language-c which was originally converted from the C TextMate bundle https://github.com/textmate/c.tmbundle."
|
||||
},
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
|
||||
"Once accepted there, we are happy to receive an update request."
|
||||
],
|
||||
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/d937b80a19706d518e5fe52357d7c50d34a26e60",
|
||||
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/fedd206d1b2803f31a278e9b5f098ce4bc76e532",
|
||||
"name": "C",
|
||||
"scopeName": "source.c",
|
||||
"patterns": [
|
||||
|
@ -1177,7 +1177,7 @@
|
|||
]
|
||||
},
|
||||
"member_access": {
|
||||
"match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*(\\b(?!(?:atomic_uint_least64_t|atomic_uint_least16_t|atomic_uint_least32_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_fast64_t|atomic_uint_fast32_t|atomic_int_least64_t|atomic_int_least32_t|pthread_rwlockattr_t|atomic_uint_fast16_t|pthread_mutexattr_t|atomic_int_fast16_t|atomic_uint_fast8_t|atomic_int_fast64_t|atomic_int_least8_t|atomic_int_fast32_t|atomic_int_fast8_t|pthread_condattr_t|atomic_uintptr_t|atomic_ptrdiff_t|pthread_rwlock_t|atomic_uintmax_t|pthread_mutex_t|atomic_intmax_t|atomic_intptr_t|atomic_char32_t|atomic_char16_t|pthread_attr_t|atomic_wchar_t|uint_least64_t|uint_least32_t|uint_least16_t|pthread_cond_t|pthread_once_t|uint_fast64_t|uint_fast16_t|atomic_size_t|uint_least8_t|int_least64_t|int_least32_t|int_least16_t|pthread_key_t|atomic_ullong|atomic_ushort|uint_fast32_t|atomic_schar|atomic_short|uint_fast8_t|int_fast64_t|int_fast32_t|int_fast16_t|atomic_ulong|atomic_llong|int_least8_t|atomic_uchar|memory_order|suseconds_t|int_fast8_t|atomic_bool|atomic_char|atomic_uint|atomic_long|atomic_int|useconds_t|_Imaginary|uintptr_t|pthread_t|in_addr_t|blksize_t|in_port_t|uintmax_t|uintmax_t|blkcnt_t|uint16_t|unsigned|_Complex|uint32_t|intptr_t|intmax_t|intmax_t|uint64_t|u_quad_t|int64_t|int32_t|ssize_t|caddr_t|clock_t|uint8_t|u_short|swblk_t|segsz_t|int16_t|fixpt_t|daddr_t|nlink_t|qaddr_t|size_t|time_t|mode_t|signed|quad_t|ushort|u_long|u_char|double|int8_t|ino_t|uid_t|pid_t|_Bool|float|dev_t|div_t|short|gid_t|off_t|u_int|key_t|id_t|uint|long|void|char|bool|id_t|int)\\b)[a-zA-Z_]\\w*\\b(?!\\())",
|
||||
"match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*(\\b(?!(?:atomic_uint_least64_t|atomic_uint_least16_t|atomic_uint_least32_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_fast64_t|atomic_uint_fast32_t|atomic_int_least64_t|atomic_int_least32_t|pthread_rwlockattr_t|atomic_uint_fast16_t|pthread_mutexattr_t|atomic_int_fast16_t|atomic_uint_fast8_t|atomic_int_fast64_t|atomic_int_least8_t|atomic_int_fast32_t|atomic_int_fast8_t|pthread_condattr_t|atomic_uintptr_t|atomic_ptrdiff_t|pthread_rwlock_t|atomic_uintmax_t|pthread_mutex_t|atomic_intmax_t|atomic_intptr_t|atomic_char32_t|atomic_char16_t|pthread_attr_t|atomic_wchar_t|uint_least64_t|uint_least32_t|uint_least16_t|pthread_cond_t|pthread_once_t|uint_fast64_t|uint_fast16_t|atomic_size_t|uint_least8_t|int_least64_t|int_least32_t|int_least16_t|pthread_key_t|atomic_ullong|atomic_ushort|uint_fast32_t|atomic_schar|atomic_short|uint_fast8_t|int_fast64_t|int_fast32_t|int_fast16_t|atomic_ulong|atomic_llong|int_least8_t|atomic_uchar|memory_order|suseconds_t|int_fast8_t|atomic_bool|atomic_char|atomic_uint|atomic_long|atomic_int|useconds_t|_Imaginary|blksize_t|pthread_t|in_addr_t|uintptr_t|in_port_t|uintmax_t|uintmax_t|blkcnt_t|uint16_t|unsigned|_Complex|uint32_t|intptr_t|intmax_t|intmax_t|uint64_t|u_quad_t|int64_t|int32_t|ssize_t|caddr_t|clock_t|uint8_t|u_short|swblk_t|segsz_t|int16_t|fixpt_t|daddr_t|nlink_t|qaddr_t|size_t|time_t|mode_t|signed|quad_t|ushort|u_long|u_char|double|int8_t|ino_t|uid_t|pid_t|_Bool|float|dev_t|div_t|short|gid_t|off_t|u_int|key_t|id_t|uint|long|void|char|bool|id_t|int)\\b)[a-zA-Z_]\\w*\\b(?!\\())",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "variable.other.object.access.c"
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
|
||||
"Once accepted there, we are happy to receive an update request."
|
||||
],
|
||||
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/97fe1e78f90c3234240831c5164374a7353a7a0c",
|
||||
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/fedd206d1b2803f31a278e9b5f098ce4bc76e532",
|
||||
"name": "C++",
|
||||
"scopeName": "source.cpp",
|
||||
"patterns": [
|
||||
|
@ -966,7 +966,7 @@
|
|||
]
|
||||
},
|
||||
"class_declare": {
|
||||
"match": "(class)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))?(?:(?:\\&|\\*)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*(?:\\&|\\*))?((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?![:{])",
|
||||
"match": "((?<!\\w)class(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))?(?:(?:\\&|\\*)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*(?:\\&|\\*))?((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?![:{])",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "storage.type.class.declare.cpp"
|
||||
|
@ -3307,7 +3307,7 @@
|
|||
]
|
||||
},
|
||||
"enum_declare": {
|
||||
"match": "(enum)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))?(?:(?:\\&|\\*)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*(?:\\&|\\*))?((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?![:{])",
|
||||
"match": "((?<!\\w)enum(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))?(?:(?:\\&|\\*)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*(?:\\&|\\*))?((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?![:{])",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "storage.type.enum.declare.cpp"
|
||||
|
@ -12450,7 +12450,7 @@
|
|||
]
|
||||
},
|
||||
"struct_declare": {
|
||||
"match": "(struct)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))?(?:(?:\\&|\\*)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*(?:\\&|\\*))?((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?![:{])",
|
||||
"match": "((?<!\\w)struct(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))?(?:(?:\\&|\\*)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*(?:\\&|\\*))?((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?![:{])",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "storage.type.struct.declare.cpp"
|
||||
|
@ -15976,7 +15976,7 @@
|
|||
]
|
||||
},
|
||||
"union_declare": {
|
||||
"match": "(union)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))?(?:(?:\\&|\\*)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*(?:\\&|\\*))?((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?![:{])",
|
||||
"match": "((?<!\\w)union(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))?(?:(?:\\&|\\*)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*(?:\\&|\\*))?((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?![:{])",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "storage.type.union.declare.cpp"
|
||||
|
|
|
@ -11,7 +11,7 @@ const suite = 'Integration CSS Extension Tests';
|
|||
|
||||
const options = {
|
||||
ui: 'tdd',
|
||||
useColors: true,
|
||||
useColors: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'),
|
||||
timeout: 60000
|
||||
};
|
||||
|
||||
|
|
|
@ -231,6 +231,9 @@ export function expandEmmetAbbreviation(args: any): Thenable<boolean | undefined
|
|||
return fallbackTab();
|
||||
}
|
||||
|
||||
/**
|
||||
* Short circuit the parsing. If previous character is space, do not expand.
|
||||
*/
|
||||
if (vscode.window.activeTextEditor.selections.length === 1 &&
|
||||
vscode.window.activeTextEditor.selection.isEmpty
|
||||
) {
|
||||
|
@ -261,13 +264,6 @@ export function expandEmmetAbbreviation(args: any): Thenable<boolean | undefined
|
|||
}
|
||||
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
let rootNode: Node | undefined;
|
||||
let usePartialParsing = vscode.workspace.getConfiguration('emmet')['optimizeStylesheetParsing'] === true;
|
||||
if (editor.selections.length === 1 && isStyleSheet(editor.document.languageId) && usePartialParsing && editor.document.lineCount > 1000) {
|
||||
rootNode = parsePartialStylesheet(editor.document, editor.selection.isReversed ? editor.selection.anchor : editor.selection.active);
|
||||
} else {
|
||||
rootNode = parseDocument(editor.document, false);
|
||||
}
|
||||
|
||||
// When tabbed on a non empty selection, do not treat it as an emmet abbreviation, and fallback to tab instead
|
||||
if (vscode.workspace.getConfiguration('emmet')['triggerExpansionOnTab'] === true && editor.selections.find(x => !x.isEmpty)) {
|
||||
|
@ -319,6 +315,22 @@ export function expandEmmetAbbreviation(args: any): Thenable<boolean | undefined
|
|||
return posA.compareTo(posB) * -1;
|
||||
});
|
||||
|
||||
let rootNode: Node | undefined;
|
||||
function getRootNode() {
|
||||
if (rootNode) {
|
||||
return rootNode;
|
||||
}
|
||||
|
||||
let usePartialParsing = vscode.workspace.getConfiguration('emmet')['optimizeStylesheetParsing'] === true;
|
||||
if (editor.selections.length === 1 && isStyleSheet(editor.document.languageId) && usePartialParsing && editor.document.lineCount > 1000) {
|
||||
rootNode = parsePartialStylesheet(editor.document, editor.selection.isReversed ? editor.selection.anchor : editor.selection.active);
|
||||
} else {
|
||||
rootNode = parseDocument(editor.document, false);
|
||||
}
|
||||
|
||||
return rootNode;
|
||||
}
|
||||
|
||||
selectionsInReverseOrder.forEach(selection => {
|
||||
let position = selection.isReversed ? selection.anchor : selection.active;
|
||||
let [rangeToReplace, abbreviation, filter] = getAbbreviation(editor.document, selection, position, syntax);
|
||||
|
@ -328,7 +340,7 @@ export function expandEmmetAbbreviation(args: any): Thenable<boolean | undefined
|
|||
if (!helper.isAbbreviationValid(syntax, abbreviation)) {
|
||||
return;
|
||||
}
|
||||
let currentNode = getNode(rootNode, position, true);
|
||||
let currentNode = getNode(getRootNode(), position, true);
|
||||
let validateLocation = true;
|
||||
let syntaxToUse = syntax;
|
||||
|
||||
|
@ -345,7 +357,7 @@ export function expandEmmetAbbreviation(args: any): Thenable<boolean | undefined
|
|||
}
|
||||
}
|
||||
|
||||
if (validateLocation && !isValidLocationForEmmetAbbreviation(editor.document, rootNode, currentNode, syntaxToUse, position, rangeToReplace)) {
|
||||
if (validateLocation && !isValidLocationForEmmetAbbreviation(editor.document, getRootNode(), currentNode, syntaxToUse, position, rangeToReplace)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -665,4 +677,4 @@ export function getSyntaxFromArgs(args: { [x: string]: string }): string | undef
|
|||
}
|
||||
|
||||
return syntax;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ const suite = 'Integration Emmet Tests';
|
|||
|
||||
const options: any = {
|
||||
ui: 'tdd',
|
||||
useColors: true,
|
||||
useColors: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'),
|
||||
timeout: 60000
|
||||
};
|
||||
|
||||
|
|
|
@ -1139,11 +1139,6 @@
|
|||
"when": "scmProvider == git && scmResourceGroup == workingTree",
|
||||
"group": "2_view"
|
||||
},
|
||||
{
|
||||
"command": "git.openChange",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree",
|
||||
"group": "navigation"
|
||||
},
|
||||
{
|
||||
"command": "git.openChange",
|
||||
"when": "scmProvider == git && scmResourceGroup == untracked",
|
||||
|
@ -1613,6 +1608,12 @@
|
|||
"default": "mixed",
|
||||
"description": "%config.untrackedChanges%",
|
||||
"scope": "resource"
|
||||
},
|
||||
"git.restoreCommitTemplateComments": {
|
||||
"type": "boolean",
|
||||
"scope": "resource",
|
||||
"default": true,
|
||||
"description": "%config.restoreCommitTemplateComments%"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1764,7 +1765,7 @@
|
|||
"byline": "^5.0.0",
|
||||
"file-type": "^7.2.0",
|
||||
"iconv-lite": "^0.4.24",
|
||||
"jschardet": "^1.6.0",
|
||||
"jschardet": "2.1.1",
|
||||
"vscode-extension-telemetry": "0.1.1",
|
||||
"vscode-nls": "^4.0.0",
|
||||
"vscode-uri": "^2.0.0",
|
||||
|
|
|
@ -139,6 +139,7 @@
|
|||
"config.untrackedChanges.mixed": "All changes, tracked and untracked, appear together and behave equally.",
|
||||
"config.untrackedChanges.separate": "Untracked changes appear separately in the Source Control view. They are also excluded from several actions.",
|
||||
"config.untrackedChanges.hidden": "Untracked changes are hidden and excluded from several actions.",
|
||||
"config.restoreCommitTemplateComments": "Controls whether to restore commit template comments in the commit input box.",
|
||||
"colors.added": "Color for added resources.",
|
||||
"colors.modified": "Color for modified resources.",
|
||||
"colors.deleted": "Color for deleted resources.",
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
|
||||
import * as jschardet from 'jschardet';
|
||||
|
||||
jschardet.Constants.MINIMUM_THRESHOLD = 0.2;
|
||||
|
||||
function detectEncodingByBOM(buffer: Buffer): string | null {
|
||||
if (!buffer || buffer.length < 2) {
|
||||
return null;
|
||||
|
|
|
@ -1813,10 +1813,18 @@ export class Repository {
|
|||
}
|
||||
|
||||
cleanupCommitEditMessage(message: string): string {
|
||||
//TODO: Support core.commentChar
|
||||
return message.replace(/^\s*#.*$\n?/gm, '').trim();
|
||||
}
|
||||
// If the message is a single line starting with whitespace followed by `#`, just allow it.
|
||||
if (/^\s*#[^\n]*$/.test(message)) {
|
||||
return message;
|
||||
}
|
||||
|
||||
// Else, remove all lines starting with whitespace followed by `#`.
|
||||
// TODO: Support core.commentChar
|
||||
return message.replace(/^(\s*#)(.*)$(\n?)/gm, (_, prefix, content, suffix) => {
|
||||
// https://github.com/microsoft/vscode/issues/84201#issuecomment-552834814
|
||||
return /^\d/.test(content) ? `${prefix}${content}${suffix}` : '';
|
||||
}).trim();
|
||||
}
|
||||
|
||||
async getMergeMessage(): Promise<string | undefined> {
|
||||
const mergeMsgPath = path.join(this.repositoryRoot, '.git', 'MERGE_MSG');
|
||||
|
|
|
@ -844,7 +844,15 @@ export class Repository implements Disposable {
|
|||
return mergeMessage;
|
||||
}
|
||||
|
||||
return await this.repository.getCommitTemplate();
|
||||
let template = await this.repository.getCommitTemplate();
|
||||
|
||||
const config = workspace.getConfiguration('git', Uri.file(this.root));
|
||||
|
||||
if (!config.get<boolean>('restoreCommitTemplateComments')) {
|
||||
template = this.cleanUpCommitEditMessage(template);
|
||||
}
|
||||
|
||||
return template;
|
||||
}
|
||||
|
||||
getConfigs(): Promise<{ key: string; value: string; }[]> {
|
||||
|
@ -1278,7 +1286,7 @@ export class Repository implements Disposable {
|
|||
return await this.run(Operation.GetCommitTemplate, async () => this.repository.getCommitTemplate());
|
||||
}
|
||||
|
||||
async cleanUpCommitEditMessage(editMessage: string): Promise<string> {
|
||||
cleanUpCommitEditMessage(editMessage: string): string {
|
||||
return this.repository.cleanupCommitEditMessage(editMessage);
|
||||
}
|
||||
|
||||
|
|
11
extensions/git/src/typings/jschardet.d.ts
vendored
11
extensions/git/src/typings/jschardet.d.ts
vendored
|
@ -1,11 +0,0 @@
|
|||
declare module 'jschardet' {
|
||||
export interface IDetectedMap {
|
||||
encoding: string,
|
||||
confidence: number
|
||||
}
|
||||
export function detect(buffer: Buffer): IDetectedMap;
|
||||
|
||||
export const Constants: {
|
||||
MINIMUM_THRESHOLD: number,
|
||||
}
|
||||
}
|
|
@ -176,10 +176,10 @@ isexe@^2.0.0:
|
|||
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
||||
integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
|
||||
|
||||
jschardet@^1.6.0:
|
||||
version "1.6.0"
|
||||
resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.6.0.tgz#c7d1a71edcff2839db2f9ec30fc5d5ebd3c1a678"
|
||||
integrity sha512-xYuhvQ7I9PDJIGBWev9xm0+SMSed3ZDBAmvVjbFR1ZRLAF+vlXcQu6cRI9uAlj81rzikElRVteehwV7DuX2ZmQ==
|
||||
jschardet@2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-2.1.1.tgz#af6f8fd0b3b0f5d46a8fd9614a4fce490575c184"
|
||||
integrity sha512-pA5qG9Zwm8CBpGlK/lo2GE9jPxwqRgMV7Lzc/1iaPccw6v4Rhj8Zg2BTyrdmHmxlJojnbLupLeRnaPLsq03x6Q==
|
||||
|
||||
json3@3.3.2:
|
||||
version "3.3.2"
|
||||
|
|
|
@ -11,7 +11,7 @@ const suite = 'Integration HTML Extension Tests';
|
|||
|
||||
const options = {
|
||||
ui: 'tdd',
|
||||
useColors: true,
|
||||
useColors: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'),
|
||||
timeout: 60000
|
||||
};
|
||||
|
||||
|
|
|
@ -241,7 +241,11 @@
|
|||
});
|
||||
|
||||
container.addEventListener('wheel', (/** @type {WheelEvent} */ e) => {
|
||||
e.preventDefault();
|
||||
// Prevent pinch to zoom
|
||||
if (e.ctrlKey) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
if (!image || !hasLoadedImage) {
|
||||
return;
|
||||
}
|
||||
|
@ -260,8 +264,6 @@
|
|||
}, { passive: false });
|
||||
|
||||
window.addEventListener('scroll', e => {
|
||||
e.preventDefault();
|
||||
|
||||
if (!image || !hasLoadedImage || !image.parentElement || scale === 'fit') {
|
||||
return;
|
||||
}
|
||||
|
@ -270,7 +272,7 @@
|
|||
if (entry) {
|
||||
vscode.setState({ scale: entry.scale, offsetX: window.scrollX, offsetY: window.scrollY });
|
||||
}
|
||||
}, { passive: false });
|
||||
}, { passive: true });
|
||||
|
||||
container.classList.add('image');
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
"priority": "builtin",
|
||||
"selector": [
|
||||
{
|
||||
"filenamePattern": "*.{jpg,jpe,jpeg,png,bmp,gif,ico,tga,webp}",
|
||||
"filenamePattern": "*.{jpg,jpe,jpeg,png,bmp,gif,ico,webp}",
|
||||
"mime": "image/*"
|
||||
}
|
||||
]
|
||||
|
@ -45,6 +45,11 @@
|
|||
"command": "imagePreview.zoomOut",
|
||||
"title": "%command.zoomOut%",
|
||||
"category": "Image Preview"
|
||||
},
|
||||
{
|
||||
"command": "imagePreview.testing.makeEdit",
|
||||
"title": "Make test edit",
|
||||
"category": "Image Preview"
|
||||
}
|
||||
],
|
||||
"menus": {
|
||||
|
@ -58,6 +63,11 @@
|
|||
"command": "imagePreview.zoomOut",
|
||||
"when": "imagePreviewFocus",
|
||||
"group": "1_imagePreview"
|
||||
},
|
||||
{
|
||||
"command": "imagePreview.testing.makeEdit",
|
||||
"when": "imagePreviewTestMode",
|
||||
"group": "1_imagePreview"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -23,8 +23,7 @@ export function activate(context: vscode.ExtensionContext) {
|
|||
PreviewManager.viewType,
|
||||
{
|
||||
async resolveWebviewEditor({ resource }, editor: vscode.WebviewPanel): Promise<vscode.WebviewEditorCapabilities> {
|
||||
previewManager.resolve(resource, editor);
|
||||
return {};
|
||||
return previewManager.resolve(resource, editor);
|
||||
}
|
||||
}));
|
||||
|
||||
|
@ -35,5 +34,20 @@ export function activate(context: vscode.ExtensionContext) {
|
|||
context.subscriptions.push(vscode.commands.registerCommand('imagePreview.zoomOut', () => {
|
||||
previewManager.activePreview?.zoomOut();
|
||||
}));
|
||||
|
||||
context.subscriptions.push(vscode.commands.registerCommand('imagePreview.testing.makeEdit', () => {
|
||||
previewManager.activePreview?.test_makeEdit();
|
||||
}));
|
||||
|
||||
context.subscriptions.push(vscode.workspace.onDidChangeConfiguration(e => {
|
||||
if (e.affectsConfiguration('imagePreview.customEditorTestMode')) {
|
||||
updateTestMode();
|
||||
}
|
||||
}));
|
||||
updateTestMode();
|
||||
}
|
||||
|
||||
function updateTestMode() {
|
||||
const isInTestMode = vscode.workspace.getConfiguration('imagePreview').get<boolean>('customEditorTestMode', false);
|
||||
vscode.commands.executeCommand('setContext', 'imagePreviewTestMode', isInTestMode);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ export class PreviewManager {
|
|||
public resolve(
|
||||
resource: vscode.Uri,
|
||||
webviewEditor: vscode.WebviewPanel,
|
||||
) {
|
||||
): vscode.WebviewEditorCapabilities {
|
||||
const preview = new Preview(this.extensionRoot, resource, webviewEditor, this.sizeStatusBarEntry, this.zoomStatusBarEntry);
|
||||
this._previews.add(preview);
|
||||
this.setActivePreview(preview);
|
||||
|
@ -42,6 +42,10 @@ export class PreviewManager {
|
|||
this.setActivePreview(undefined);
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
editingCapability: preview
|
||||
};
|
||||
}
|
||||
|
||||
public get activePreview() { return this._activePreview; }
|
||||
|
@ -62,7 +66,7 @@ const enum PreviewState {
|
|||
Active,
|
||||
}
|
||||
|
||||
class Preview extends Disposable {
|
||||
class Preview extends Disposable implements vscode.WebviewEditorEditingCapability {
|
||||
|
||||
private readonly id: string = `${Date.now()}-${Math.random().toString()}`;
|
||||
|
||||
|
@ -192,8 +196,11 @@ class Preview extends Disposable {
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
|
||||
<!-- Disable pinch zooming -->
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
|
||||
|
||||
<title>Image Preview</title>
|
||||
|
||||
<link rel="stylesheet" href="${escapeAttribute(this.extensionResource('/media/main.css'))}" type="text/css" media="screen" nonce="${nonce}">
|
||||
|
@ -218,8 +225,11 @@ class Preview extends Disposable {
|
|||
// Show blank image
|
||||
return encodeURI('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAEElEQVR42gEFAPr/AP///wAI/AL+Sr4t6gAAAABJRU5ErkJggg==');
|
||||
|
||||
|
||||
default:
|
||||
// Avoid adding cache busting if there is already a query string
|
||||
if (resource.query) {
|
||||
return encodeURI(webviewEditor.webview.asWebviewUri(resource).toString(true));
|
||||
}
|
||||
return encodeURI(webviewEditor.webview.asWebviewUri(resource).toString(true) + `?version=${version}`);
|
||||
}
|
||||
}
|
||||
|
@ -229,6 +239,24 @@ class Preview extends Disposable {
|
|||
path: this.extensionRoot.path + path
|
||||
}));
|
||||
}
|
||||
|
||||
//#region WebviewEditorCapabilities
|
||||
private readonly _onEdit = this._register(new vscode.EventEmitter<{ now: number }>());
|
||||
public readonly onEdit = this._onEdit.event;
|
||||
|
||||
async save() { }
|
||||
|
||||
async hotExit() { }
|
||||
|
||||
async applyEdits(_edits: any[]) { }
|
||||
|
||||
async undoEdits(edits: any[]) { console.log('undo', edits); }
|
||||
|
||||
//#endregion
|
||||
|
||||
public test_makeEdit() {
|
||||
this._onEdit.fire({ now: Date.now() });
|
||||
}
|
||||
}
|
||||
|
||||
function escapeAttribute(value: string | vscode.Uri): string {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -25,7 +25,8 @@
|
|||
"onCommand:markdown.showSource",
|
||||
"onCommand:markdown.showPreviewSecuritySelector",
|
||||
"onCommand:markdown.api.render",
|
||||
"onWebviewPanel:markdown.preview"
|
||||
"onWebviewPanel:markdown.preview",
|
||||
"onWebviewEditor:vscode.markdown.preview.editor"
|
||||
],
|
||||
"contributes": {
|
||||
"commands": [
|
||||
|
@ -307,6 +308,18 @@
|
|||
],
|
||||
"markdown.previewScripts": [
|
||||
"./media/index.js"
|
||||
],
|
||||
"webviewEditors": [
|
||||
{
|
||||
"viewType": "vscode.markdown.preview.editor",
|
||||
"displayName": "(Experimental) VS Code Markdown Preview",
|
||||
"priority": "option",
|
||||
"selector": [
|
||||
{
|
||||
"filenamePattern": "*.md"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
|
@ -332,7 +345,7 @@
|
|||
"mocha-junit-reporter": "^1.17.0",
|
||||
"mocha-multi-reporters": "^1.1.7",
|
||||
"ts-loader": "^6.2.1",
|
||||
"typescript": "^3.6.4",
|
||||
"typescript": "^3.7.2",
|
||||
"vscode": "^1.1.10",
|
||||
"webpack": "^4.41.2",
|
||||
"webpack-cli": "^3.3.0"
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
import { getSettings } from './settings';
|
||||
|
||||
const codeLineClass = 'code-line';
|
||||
|
||||
function clamp(min: number, max: number, value: number) {
|
||||
return Math.min(max, Math.max(min, value));
|
||||
|
@ -25,7 +26,7 @@ const getCodeLineElements = (() => {
|
|||
return () => {
|
||||
if (!elements) {
|
||||
elements = [{ element: document.body, line: 0 }];
|
||||
for (const element of document.getElementsByClassName('code-line')) {
|
||||
for (const element of document.getElementsByClassName(codeLineClass)) {
|
||||
const line = +element.getAttribute('data-line')!;
|
||||
if (isNaN(line)) {
|
||||
continue;
|
||||
|
@ -75,7 +76,7 @@ export function getLineElementsAtPageOffset(offset: number): { previous: CodeLin
|
|||
let hi = lines.length - 1;
|
||||
while (lo + 1 < hi) {
|
||||
const mid = Math.floor((lo + hi) / 2);
|
||||
const bounds = lines[mid].element.getBoundingClientRect();
|
||||
const bounds = getElementBounds(lines[mid]);
|
||||
if (bounds.top + bounds.height >= position) {
|
||||
hi = mid;
|
||||
}
|
||||
|
@ -84,7 +85,7 @@ export function getLineElementsAtPageOffset(offset: number): { previous: CodeLin
|
|||
}
|
||||
}
|
||||
const hiElement = lines[hi];
|
||||
const hiBounds = hiElement.element.getBoundingClientRect();
|
||||
const hiBounds = getElementBounds(hiElement);
|
||||
if (hi >= 1 && hiBounds.top > position) {
|
||||
const loElement = lines[lo];
|
||||
return { previous: loElement, next: hiElement };
|
||||
|
@ -95,6 +96,24 @@ export function getLineElementsAtPageOffset(offset: number): { previous: CodeLin
|
|||
return { previous: hiElement };
|
||||
}
|
||||
|
||||
function getElementBounds({ element }: CodeLineElement): { top: number, height: number } {
|
||||
const myBounds = element.getBoundingClientRect();
|
||||
|
||||
// Some code line elements may contain other code line elements.
|
||||
// In those cases, only take the height up to that child.
|
||||
const codeLineChild = element.querySelector(`.${codeLineClass}`);
|
||||
if (codeLineChild) {
|
||||
const childBounds = codeLineChild.getBoundingClientRect();
|
||||
const height = Math.max(1, (childBounds.top - myBounds.top));
|
||||
return {
|
||||
top: myBounds.top,
|
||||
height: height
|
||||
};
|
||||
}
|
||||
|
||||
return myBounds;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to reveal the element for a source line in the editor.
|
||||
*/
|
||||
|
@ -113,7 +132,7 @@ export function scrollToRevealSourceLine(line: number) {
|
|||
return;
|
||||
}
|
||||
let scrollTo = 0;
|
||||
const rect = previous.element.getBoundingClientRect();
|
||||
const rect = getElementBounds(previous);
|
||||
const previousTop = rect.top;
|
||||
if (next && next.line !== previous.line) {
|
||||
// Between two elements. Go to percentage offset between them.
|
||||
|
@ -130,10 +149,10 @@ export function scrollToRevealSourceLine(line: number) {
|
|||
export function getEditorLineNumberForPageOffset(offset: number) {
|
||||
const { previous, next } = getLineElementsAtPageOffset(offset);
|
||||
if (previous) {
|
||||
const previousBounds = previous.element.getBoundingClientRect();
|
||||
const previousBounds = getElementBounds(previous);
|
||||
const offsetFromPrevious = (offset - window.scrollY - previousBounds.top);
|
||||
if (next) {
|
||||
const progressBetweenElements = offsetFromPrevious / (next.element.getBoundingClientRect().top - previousBounds.top);
|
||||
const progressBetweenElements = offsetFromPrevious / (getElementBounds(next).top - previousBounds.top);
|
||||
const line = previous.line + progressBetweenElements * (next.line - previous.line);
|
||||
return clampLine(line);
|
||||
} else {
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
import * as vscode from 'vscode';
|
||||
|
||||
import { Command } from '../commandManager';
|
||||
import { MarkdownPreviewManager } from '../features/previewManager';
|
||||
import { MarkdownPreviewManager, DynamicPreviewSettings } from '../features/previewManager';
|
||||
import { TelemetryReporter } from '../telemetryReporter';
|
||||
import { PreviewSettings } from '../features/preview';
|
||||
|
||||
interface ShowPreviewSettings {
|
||||
readonly sideBySide?: boolean;
|
||||
|
@ -39,7 +38,7 @@ async function showPreview(
|
|||
}
|
||||
|
||||
const resourceColumn = (vscode.window.activeTextEditor && vscode.window.activeTextEditor.viewColumn) || vscode.ViewColumn.One;
|
||||
webviewManager.preview(resource, {
|
||||
webviewManager.openDynamicPreview(resource, {
|
||||
resourceColumn: resourceColumn,
|
||||
previewColumn: previewSettings.sideBySide ? resourceColumn + 1 : resourceColumn,
|
||||
locked: !!previewSettings.locked
|
||||
|
@ -59,7 +58,7 @@ export class ShowPreviewCommand implements Command {
|
|||
private readonly telemetryReporter: TelemetryReporter
|
||||
) { }
|
||||
|
||||
public execute(mainUri?: vscode.Uri, allUris?: vscode.Uri[], previewSettings?: PreviewSettings) {
|
||||
public execute(mainUri?: vscode.Uri, allUris?: vscode.Uri[], previewSettings?: DynamicPreviewSettings) {
|
||||
for (const uri of Array.isArray(allUris) ? allUris : [mainUri]) {
|
||||
showPreview(this.webviewManager, this.telemetryReporter, uri, {
|
||||
sideBySide: false,
|
||||
|
@ -77,7 +76,7 @@ export class ShowPreviewToSideCommand implements Command {
|
|||
private readonly telemetryReporter: TelemetryReporter
|
||||
) { }
|
||||
|
||||
public execute(uri?: vscode.Uri, previewSettings?: PreviewSettings) {
|
||||
public execute(uri?: vscode.Uri, previewSettings?: DynamicPreviewSettings) {
|
||||
showPreview(this.webviewManager, this.telemetryReporter, uri, {
|
||||
sideBySide: true,
|
||||
locked: previewSettings && previewSettings.locked
|
||||
|
|
|
@ -11,7 +11,7 @@ import { MarkdownContentProvider } from './previewContentProvider';
|
|||
import { Disposable } from '../util/dispose';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
import { getVisibleLine, MarkdownFileTopmostLineMonitor } from '../util/topmostLineMonitor';
|
||||
import { getVisibleLine, TopmostLineMonitor } from '../util/topmostLineMonitor';
|
||||
import { MarkdownPreviewConfigurationManager } from './previewConfig';
|
||||
import { MarkdownContributionProvider, MarkdownContributions } from '../markdownExtensions';
|
||||
import { isMarkdownFile } from '../util/file';
|
||||
|
@ -72,11 +72,22 @@ export class PreviewDocumentVersion {
|
|||
}
|
||||
}
|
||||
|
||||
export class MarkdownPreview extends Disposable {
|
||||
interface DynamicPreviewInput {
|
||||
readonly resource: vscode.Uri;
|
||||
readonly resourceColumn: vscode.ViewColumn;
|
||||
readonly locked: boolean;
|
||||
readonly line?: number;
|
||||
}
|
||||
|
||||
export class DynamicMarkdownPreview extends Disposable {
|
||||
|
||||
public static readonly viewType = 'markdown.preview';
|
||||
|
||||
private readonly delay = 300;
|
||||
|
||||
private _resource: vscode.Uri;
|
||||
private readonly _resourceColumn: vscode.ViewColumn;
|
||||
|
||||
private _locked: boolean;
|
||||
|
||||
private readonly editor: vscode.WebviewPanel;
|
||||
|
@ -84,92 +95,65 @@ export class MarkdownPreview extends Disposable {
|
|||
private line: number | undefined = undefined;
|
||||
private firstUpdate = true;
|
||||
private currentVersion?: PreviewDocumentVersion;
|
||||
private forceUpdate = false;
|
||||
private isScrolling = false;
|
||||
private _disposed: boolean = false;
|
||||
private imageInfo: { id: string, width: number, height: number; }[] = [];
|
||||
private scrollToFragment: string | undefined;
|
||||
|
||||
public static async revive(
|
||||
public static revive(
|
||||
input: DynamicPreviewInput,
|
||||
webview: vscode.WebviewPanel,
|
||||
state: any,
|
||||
contentProvider: MarkdownContentProvider,
|
||||
previewConfigurations: MarkdownPreviewConfigurationManager,
|
||||
logger: Logger,
|
||||
topmostLineMonitor: MarkdownFileTopmostLineMonitor,
|
||||
topmostLineMonitor: TopmostLineMonitor,
|
||||
contributionProvider: MarkdownContributionProvider,
|
||||
): Promise<MarkdownPreview> {
|
||||
const resource = vscode.Uri.parse(state.resource);
|
||||
const locked = state.locked;
|
||||
const line = state.line;
|
||||
const resourceColumn = state.resourceColumn;
|
||||
): DynamicMarkdownPreview {
|
||||
webview.webview.options = DynamicMarkdownPreview.getWebviewOptions(input.resource, contributionProvider.contributions);
|
||||
webview.title = DynamicMarkdownPreview.getPreviewTitle(input.resource, input.locked);
|
||||
|
||||
const preview = new MarkdownPreview(
|
||||
webview,
|
||||
resource,
|
||||
locked,
|
||||
resourceColumn,
|
||||
contentProvider,
|
||||
previewConfigurations,
|
||||
logger,
|
||||
topmostLineMonitor,
|
||||
contributionProvider);
|
||||
|
||||
preview.editor.webview.options = MarkdownPreview.getWebviewOptions(resource, contributionProvider.contributions);
|
||||
|
||||
if (!isNaN(line)) {
|
||||
preview.line = line;
|
||||
}
|
||||
await preview.doUpdate();
|
||||
return preview;
|
||||
return new DynamicMarkdownPreview(webview, input,
|
||||
contentProvider, previewConfigurations, logger, topmostLineMonitor, contributionProvider);
|
||||
}
|
||||
|
||||
public static create(
|
||||
resource: vscode.Uri,
|
||||
input: DynamicPreviewInput,
|
||||
previewColumn: vscode.ViewColumn,
|
||||
resourceColumn: vscode.ViewColumn,
|
||||
locked: boolean,
|
||||
contentProvider: MarkdownContentProvider,
|
||||
previewConfigurations: MarkdownPreviewConfigurationManager,
|
||||
logger: Logger,
|
||||
topmostLineMonitor: MarkdownFileTopmostLineMonitor,
|
||||
topmostLineMonitor: TopmostLineMonitor,
|
||||
contributionProvider: MarkdownContributionProvider
|
||||
): MarkdownPreview {
|
||||
): DynamicMarkdownPreview {
|
||||
const webview = vscode.window.createWebviewPanel(
|
||||
MarkdownPreview.viewType,
|
||||
MarkdownPreview.getPreviewTitle(resource, locked),
|
||||
DynamicMarkdownPreview.viewType,
|
||||
DynamicMarkdownPreview.getPreviewTitle(input.resource, input.locked),
|
||||
previewColumn, {
|
||||
enableFindWidget: true,
|
||||
...MarkdownPreview.getWebviewOptions(resource, contributionProvider.contributions)
|
||||
...DynamicMarkdownPreview.getWebviewOptions(input.resource, contributionProvider.contributions)
|
||||
});
|
||||
|
||||
return new MarkdownPreview(
|
||||
webview,
|
||||
resource,
|
||||
locked,
|
||||
resourceColumn,
|
||||
contentProvider,
|
||||
previewConfigurations,
|
||||
logger,
|
||||
topmostLineMonitor,
|
||||
contributionProvider);
|
||||
return new DynamicMarkdownPreview(webview, input,
|
||||
contentProvider, previewConfigurations, logger, topmostLineMonitor, contributionProvider);
|
||||
}
|
||||
|
||||
private constructor(
|
||||
webview: vscode.WebviewPanel,
|
||||
resource: vscode.Uri,
|
||||
locked: boolean,
|
||||
private readonly _resourceColumn: vscode.ViewColumn,
|
||||
input: DynamicPreviewInput,
|
||||
private readonly _contentProvider: MarkdownContentProvider,
|
||||
private readonly _previewConfigurations: MarkdownPreviewConfigurationManager,
|
||||
private readonly _logger: Logger,
|
||||
topmostLineMonitor: MarkdownFileTopmostLineMonitor,
|
||||
topmostLineMonitor: TopmostLineMonitor,
|
||||
private readonly _contributionProvider: MarkdownContributionProvider,
|
||||
) {
|
||||
super();
|
||||
this._resource = resource;
|
||||
this._locked = locked;
|
||||
this._resource = input.resource;
|
||||
this._resourceColumn = input.resourceColumn;
|
||||
this._locked = input.locked;
|
||||
this.editor = webview;
|
||||
if (!isNaN(input.line!)) {
|
||||
this.line = input.line;
|
||||
}
|
||||
|
||||
this._register(this.editor.onDidDispose(() => {
|
||||
this.dispose();
|
||||
|
@ -190,7 +174,7 @@ export class MarkdownPreview extends Disposable {
|
|||
|
||||
switch (e.type) {
|
||||
case 'cacheImageSizes':
|
||||
this.onCacheImageSizes(e.body);
|
||||
this.imageInfo = e.body;
|
||||
break;
|
||||
|
||||
case 'revealLine':
|
||||
|
@ -221,7 +205,7 @@ export class MarkdownPreview extends Disposable {
|
|||
}
|
||||
}));
|
||||
|
||||
this._register(topmostLineMonitor.onDidChangeTopmostLine(event => {
|
||||
this._register(topmostLineMonitor.onDidChanged(event => {
|
||||
if (this.isPreviewOf(event.resource)) {
|
||||
this.updateForView(event.resource, event.line);
|
||||
}
|
||||
|
@ -239,9 +223,11 @@ export class MarkdownPreview extends Disposable {
|
|||
|
||||
this._register(vscode.window.onDidChangeActiveTextEditor(editor => {
|
||||
if (editor && isMarkdownFile(editor.document) && !this._locked) {
|
||||
this.update(editor.document.uri);
|
||||
this.update(editor.document.uri, false);
|
||||
}
|
||||
}));
|
||||
|
||||
this.doUpdate();
|
||||
}
|
||||
|
||||
private readonly _onDisposeEmitter = this._register(new vscode.EventEmitter<void>());
|
||||
|
@ -278,7 +264,6 @@ export class MarkdownPreview extends Disposable {
|
|||
this._onDisposeEmitter.fire();
|
||||
this._onDisposeEmitter.dispose();
|
||||
|
||||
this._onDidChangeViewStateEmitter.dispose();
|
||||
this.editor.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
@ -297,7 +282,6 @@ export class MarkdownPreview extends Disposable {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// If we have changed resources, cancel any pending updates
|
||||
const isResourceChange = resource.fsPath !== this._resource.fsPath;
|
||||
if (isResourceChange) {
|
||||
|
@ -310,9 +294,9 @@ export class MarkdownPreview extends Disposable {
|
|||
// Schedule update if none is pending
|
||||
if (!this.throttleTimer) {
|
||||
if (isResourceChange || this.firstUpdate) {
|
||||
this.doUpdate();
|
||||
this.doUpdate(isRefresh);
|
||||
} else {
|
||||
this.throttleTimer = setTimeout(() => this.doUpdate(), 300);
|
||||
this.throttleTimer = setTimeout(() => this.doUpdate(isRefresh), this.delay);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -320,7 +304,6 @@ export class MarkdownPreview extends Disposable {
|
|||
}
|
||||
|
||||
public refresh() {
|
||||
this.forceUpdate = true;
|
||||
this.update(this._resource, true);
|
||||
}
|
||||
|
||||
|
@ -350,7 +333,7 @@ export class MarkdownPreview extends Disposable {
|
|||
}
|
||||
}
|
||||
|
||||
public matches(otherPreview: MarkdownPreview): boolean {
|
||||
public matches(otherPreview: DynamicMarkdownPreview): boolean {
|
||||
return this.matchesResource(otherPreview._resource, otherPreview.position, otherPreview._locked);
|
||||
}
|
||||
|
||||
|
@ -360,7 +343,7 @@ export class MarkdownPreview extends Disposable {
|
|||
|
||||
public toggleLock() {
|
||||
this._locked = !this._locked;
|
||||
this.editor.title = MarkdownPreview.getPreviewTitle(this._resource, this._locked);
|
||||
this.editor.title = DynamicMarkdownPreview.getPreviewTitle(this._resource, this._locked);
|
||||
}
|
||||
|
||||
private get iconPath() {
|
||||
|
@ -408,7 +391,7 @@ export class MarkdownPreview extends Disposable {
|
|||
}
|
||||
}
|
||||
|
||||
private async doUpdate(): Promise<void> {
|
||||
private async doUpdate(forceUpdate?: boolean): Promise<void> {
|
||||
if (this._disposed) {
|
||||
return;
|
||||
}
|
||||
|
@ -431,13 +414,12 @@ export class MarkdownPreview extends Disposable {
|
|||
}
|
||||
|
||||
const pendingVersion = new PreviewDocumentVersion(markdownResource, document.version);
|
||||
if (!this.forceUpdate && this.currentVersion && this.currentVersion.equals(pendingVersion)) {
|
||||
if (!forceUpdate && this.currentVersion?.equals(pendingVersion)) {
|
||||
if (this.line) {
|
||||
this.updateForView(markdownResource, this.line);
|
||||
}
|
||||
return;
|
||||
}
|
||||
this.forceUpdate = false;
|
||||
|
||||
this.currentVersion = pendingVersion;
|
||||
if (this._resource === markdownResource) {
|
||||
|
@ -463,7 +445,7 @@ export class MarkdownPreview extends Disposable {
|
|||
): vscode.WebviewOptions {
|
||||
return {
|
||||
enableScripts: true,
|
||||
localResourceRoots: MarkdownPreview.getLocalResourceRoots(resource, contributions)
|
||||
localResourceRoots: DynamicMarkdownPreview.getLocalResourceRoots(resource, contributions)
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -529,9 +511,9 @@ export class MarkdownPreview extends Disposable {
|
|||
}
|
||||
|
||||
private setContent(html: string): void {
|
||||
this.editor.title = MarkdownPreview.getPreviewTitle(this._resource, this._locked);
|
||||
this.editor.title = DynamicMarkdownPreview.getPreviewTitle(this._resource, this._locked);
|
||||
this.editor.iconPath = this.iconPath;
|
||||
this.editor.webview.options = MarkdownPreview.getWebviewOptions(this._resource, this._contributionProvider.contributions);
|
||||
this.editor.webview.options = DynamicMarkdownPreview.getWebviewOptions(this._resource, this._contributionProvider.contributions);
|
||||
this.editor.webview.html = html;
|
||||
}
|
||||
|
||||
|
@ -559,14 +541,4 @@ export class MarkdownPreview extends Disposable {
|
|||
|
||||
vscode.commands.executeCommand('_markdown.openDocumentLink', { path: hrefPath, fragment, fromResource: this.resource });
|
||||
}
|
||||
|
||||
private async onCacheImageSizes(imageInfo: { id: string, width: number, height: number; }[]) {
|
||||
this.imageInfo = imageInfo;
|
||||
}
|
||||
}
|
||||
|
||||
export interface PreviewSettings {
|
||||
readonly resourceColumn: vscode.ViewColumn;
|
||||
readonly previewColumn: vscode.ViewColumn;
|
||||
readonly locked: boolean;
|
||||
}
|
||||
|
|
|
@ -7,19 +7,61 @@ import * as vscode from 'vscode';
|
|||
import { Logger } from '../logger';
|
||||
import { MarkdownContributionProvider } from '../markdownExtensions';
|
||||
import { disposeAll, Disposable } from '../util/dispose';
|
||||
import { MarkdownFileTopmostLineMonitor } from '../util/topmostLineMonitor';
|
||||
import { MarkdownPreview, PreviewSettings } from './preview';
|
||||
import { TopmostLineMonitor } from '../util/topmostLineMonitor';
|
||||
import { DynamicMarkdownPreview } from './preview';
|
||||
import { MarkdownPreviewConfigurationManager } from './previewConfig';
|
||||
import { MarkdownContentProvider } from './previewContentProvider';
|
||||
|
||||
export interface DynamicPreviewSettings {
|
||||
readonly resourceColumn: vscode.ViewColumn;
|
||||
readonly previewColumn: vscode.ViewColumn;
|
||||
readonly locked: boolean;
|
||||
}
|
||||
|
||||
export class MarkdownPreviewManager extends Disposable implements vscode.WebviewPanelSerializer {
|
||||
class PreviewStore extends Disposable {
|
||||
|
||||
private readonly _previews = new Set<DynamicMarkdownPreview>();
|
||||
|
||||
public dispose(): void {
|
||||
super.dispose();
|
||||
for (const preview of this._previews) {
|
||||
preview.dispose();
|
||||
}
|
||||
this._previews.clear();
|
||||
}
|
||||
|
||||
[Symbol.iterator](): Iterator<DynamicMarkdownPreview> {
|
||||
return this._previews[Symbol.iterator]();
|
||||
}
|
||||
|
||||
public get(resource: vscode.Uri, previewSettings: DynamicPreviewSettings): DynamicMarkdownPreview | undefined {
|
||||
for (const preview of this._previews) {
|
||||
if (preview.matchesResource(resource, previewSettings.previewColumn, previewSettings.locked)) {
|
||||
return preview;
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
public add(preview: DynamicMarkdownPreview) {
|
||||
this._previews.add(preview);
|
||||
}
|
||||
|
||||
public delete(preview: DynamicMarkdownPreview) {
|
||||
this._previews.delete(preview);
|
||||
}
|
||||
}
|
||||
|
||||
export class MarkdownPreviewManager extends Disposable implements vscode.WebviewPanelSerializer, vscode.WebviewEditorProvider {
|
||||
private static readonly markdownPreviewActiveContextKey = 'markdownPreviewFocus';
|
||||
|
||||
private readonly _topmostLineMonitor = new MarkdownFileTopmostLineMonitor();
|
||||
private readonly _topmostLineMonitor = new TopmostLineMonitor();
|
||||
private readonly _previewConfigurations = new MarkdownPreviewConfigurationManager();
|
||||
private readonly _previews: MarkdownPreview[] = [];
|
||||
private _activePreview: MarkdownPreview | undefined = undefined;
|
||||
|
||||
private readonly _dynamicPreviews = this._register(new PreviewStore());
|
||||
private readonly _staticPreviews = this._register(new PreviewStore());
|
||||
|
||||
private _activePreview: DynamicMarkdownPreview | undefined = undefined;
|
||||
|
||||
public constructor(
|
||||
private readonly _contentProvider: MarkdownContentProvider,
|
||||
|
@ -27,46 +69,48 @@ export class MarkdownPreviewManager extends Disposable implements vscode.Webview
|
|||
private readonly _contributions: MarkdownContributionProvider
|
||||
) {
|
||||
super();
|
||||
this._register(vscode.window.registerWebviewPanelSerializer(MarkdownPreview.viewType, this));
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
super.dispose();
|
||||
disposeAll(this._previews);
|
||||
this._register(vscode.window.registerWebviewPanelSerializer(DynamicMarkdownPreview.viewType, this));
|
||||
this._register(vscode.window.registerWebviewEditorProvider('vscode.markdown.preview.editor', this));
|
||||
}
|
||||
|
||||
public refresh() {
|
||||
for (const preview of this._previews) {
|
||||
for (const preview of this._dynamicPreviews) {
|
||||
preview.refresh();
|
||||
}
|
||||
for (const preview of this._staticPreviews) {
|
||||
preview.refresh();
|
||||
}
|
||||
}
|
||||
|
||||
public updateConfiguration() {
|
||||
for (const preview of this._previews) {
|
||||
for (const preview of this._dynamicPreviews) {
|
||||
preview.updateConfiguration();
|
||||
}
|
||||
for (const preview of this._staticPreviews) {
|
||||
preview.updateConfiguration();
|
||||
}
|
||||
}
|
||||
|
||||
public preview(
|
||||
public openDynamicPreview(
|
||||
resource: vscode.Uri,
|
||||
previewSettings: PreviewSettings
|
||||
settings: DynamicPreviewSettings
|
||||
): void {
|
||||
let preview = this.getExistingPreview(resource, previewSettings);
|
||||
let preview = this._dynamicPreviews.get(resource, settings);
|
||||
if (preview) {
|
||||
preview.reveal(previewSettings.previewColumn);
|
||||
preview.reveal(settings.previewColumn);
|
||||
} else {
|
||||
preview = this.createNewPreview(resource, previewSettings);
|
||||
preview = this.createNewDynamicPreview(resource, settings);
|
||||
}
|
||||
|
||||
preview.update(resource);
|
||||
}
|
||||
|
||||
public get activePreviewResource() {
|
||||
return this._activePreview && this._activePreview.resource;
|
||||
return this._activePreview?.resource;
|
||||
}
|
||||
|
||||
public get activePreviewResourceColumn() {
|
||||
return this._activePreview && this._activePreview.resourceColumn;
|
||||
return this._activePreview?.resourceColumn;
|
||||
}
|
||||
|
||||
public toggleLock() {
|
||||
|
@ -75,7 +119,7 @@ export class MarkdownPreviewManager extends Disposable implements vscode.Webview
|
|||
preview.toggleLock();
|
||||
|
||||
// Close any previews that are now redundant, such as having two dynamic previews in the same editor group
|
||||
for (const otherPreview of this._previews) {
|
||||
for (const otherPreview of this._dynamicPreviews) {
|
||||
if (otherPreview !== preview && preview.matches(otherPreview)) {
|
||||
otherPreview.dispose();
|
||||
}
|
||||
|
@ -87,35 +131,50 @@ export class MarkdownPreviewManager extends Disposable implements vscode.Webview
|
|||
webview: vscode.WebviewPanel,
|
||||
state: any
|
||||
): Promise<void> {
|
||||
const preview = await MarkdownPreview.revive(
|
||||
const resource = vscode.Uri.parse(state.resource);
|
||||
const locked = state.locked;
|
||||
const line = state.line;
|
||||
const resourceColumn = state.resourceColumn;
|
||||
|
||||
const preview = await DynamicMarkdownPreview.revive(
|
||||
{ resource, locked, line, resourceColumn },
|
||||
webview,
|
||||
state,
|
||||
this._contentProvider,
|
||||
this._previewConfigurations,
|
||||
this._logger,
|
||||
this._topmostLineMonitor,
|
||||
this._contributions);
|
||||
|
||||
this.registerPreview(preview);
|
||||
this.registerDynamicPreview(preview);
|
||||
}
|
||||
|
||||
private getExistingPreview(
|
||||
resource: vscode.Uri,
|
||||
previewSettings: PreviewSettings
|
||||
): MarkdownPreview | undefined {
|
||||
return this._previews.find(preview =>
|
||||
preview.matchesResource(resource, previewSettings.previewColumn, previewSettings.locked));
|
||||
public async resolveWebviewEditor(
|
||||
input: { readonly resource: vscode.Uri; },
|
||||
webview: vscode.WebviewPanel
|
||||
): Promise<vscode.WebviewEditorCapabilities> {
|
||||
const preview = DynamicMarkdownPreview.revive(
|
||||
{ resource: input.resource, locked: false, resourceColumn: vscode.ViewColumn.One },
|
||||
webview,
|
||||
this._contentProvider,
|
||||
this._previewConfigurations,
|
||||
this._logger,
|
||||
this._topmostLineMonitor,
|
||||
this._contributions);
|
||||
this.registerStaticPreview(preview);
|
||||
return {};
|
||||
}
|
||||
|
||||
private createNewPreview(
|
||||
private createNewDynamicPreview(
|
||||
resource: vscode.Uri,
|
||||
previewSettings: PreviewSettings
|
||||
): MarkdownPreview {
|
||||
const preview = MarkdownPreview.create(
|
||||
resource,
|
||||
previewSettings: DynamicPreviewSettings
|
||||
): DynamicMarkdownPreview {
|
||||
const preview = DynamicMarkdownPreview.create(
|
||||
{
|
||||
resource,
|
||||
resourceColumn: previewSettings.resourceColumn,
|
||||
locked: previewSettings.locked,
|
||||
},
|
||||
previewSettings.previewColumn,
|
||||
previewSettings.resourceColumn,
|
||||
previewSettings.locked,
|
||||
this._contentProvider,
|
||||
this._previewConfigurations,
|
||||
this._logger,
|
||||
|
@ -124,34 +183,48 @@ export class MarkdownPreviewManager extends Disposable implements vscode.Webview
|
|||
|
||||
this.setPreviewActiveContext(true);
|
||||
this._activePreview = preview;
|
||||
return this.registerPreview(preview);
|
||||
return this.registerDynamicPreview(preview);
|
||||
}
|
||||
|
||||
private registerPreview(
|
||||
preview: MarkdownPreview
|
||||
): MarkdownPreview {
|
||||
this._previews.push(preview);
|
||||
private registerDynamicPreview(preview: DynamicMarkdownPreview): DynamicMarkdownPreview {
|
||||
this._dynamicPreviews.add(preview);
|
||||
|
||||
preview.onDispose(() => {
|
||||
const existing = this._previews.indexOf(preview);
|
||||
if (existing === -1) {
|
||||
return;
|
||||
}
|
||||
this._dynamicPreviews.delete(preview);
|
||||
});
|
||||
|
||||
this._previews.splice(existing, 1);
|
||||
this.trackActive(preview);
|
||||
|
||||
preview.onDidChangeViewState(() => {
|
||||
// Remove other dynamic previews in our column
|
||||
disposeAll(Array.from(this._dynamicPreviews).filter(otherPreview => preview !== otherPreview && preview.matches(otherPreview)));
|
||||
});
|
||||
return preview;
|
||||
}
|
||||
|
||||
private registerStaticPreview(preview: DynamicMarkdownPreview): DynamicMarkdownPreview {
|
||||
this._staticPreviews.add(preview);
|
||||
|
||||
preview.onDispose(() => {
|
||||
this._staticPreviews.delete(preview);
|
||||
});
|
||||
|
||||
this.trackActive(preview);
|
||||
return preview;
|
||||
}
|
||||
|
||||
private trackActive(preview: DynamicMarkdownPreview): void {
|
||||
preview.onDidChangeViewState(({ webviewPanel }) => {
|
||||
this.setPreviewActiveContext(webviewPanel.active);
|
||||
this._activePreview = webviewPanel.active ? preview : undefined;
|
||||
});
|
||||
|
||||
preview.onDispose(() => {
|
||||
if (this._activePreview === preview) {
|
||||
this.setPreviewActiveContext(false);
|
||||
this._activePreview = undefined;
|
||||
}
|
||||
});
|
||||
|
||||
preview.onDidChangeViewState(({ webviewPanel }) => {
|
||||
disposeAll(this._previews.filter(otherPreview => preview !== otherPreview && preview!.matches(otherPreview)));
|
||||
this.setPreviewActiveContext(webviewPanel.active);
|
||||
this._activePreview = webviewPanel.active ? preview : undefined;
|
||||
});
|
||||
|
||||
return preview;
|
||||
}
|
||||
|
||||
private setPreviewActiveContext(value: boolean) {
|
||||
|
|
|
@ -10,7 +10,7 @@ const suite = 'Integration Markdown Tests';
|
|||
|
||||
const options: any = {
|
||||
ui: 'tdd',
|
||||
useColors: true,
|
||||
useColors: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'),
|
||||
timeout: 60000
|
||||
};
|
||||
|
||||
|
|
|
@ -4,33 +4,28 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import { disposeAll } from '../util/dispose';
|
||||
import { Disposable } from '../util/dispose';
|
||||
import { isMarkdownFile } from './file';
|
||||
|
||||
export class MarkdownFileTopmostLineMonitor {
|
||||
private readonly disposables: vscode.Disposable[] = [];
|
||||
export class TopmostLineMonitor extends Disposable {
|
||||
|
||||
private readonly pendingUpdates = new Map<string, number>();
|
||||
|
||||
private readonly throttle = 50;
|
||||
|
||||
constructor() {
|
||||
vscode.window.onDidChangeTextEditorVisibleRanges(event => {
|
||||
super();
|
||||
this._register(vscode.window.onDidChangeTextEditorVisibleRanges(event => {
|
||||
if (isMarkdownFile(event.textEditor.document)) {
|
||||
const line = getVisibleLine(event.textEditor);
|
||||
if (typeof line === 'number') {
|
||||
this.updateLine(event.textEditor.document.uri, line);
|
||||
}
|
||||
}
|
||||
}, null, this.disposables);
|
||||
}));
|
||||
}
|
||||
|
||||
dispose() {
|
||||
disposeAll(this.disposables);
|
||||
}
|
||||
|
||||
private readonly _onDidChangeTopmostLineEmitter = new vscode.EventEmitter<{ resource: vscode.Uri, line: number }>();
|
||||
public readonly onDidChangeTopmostLine = this._onDidChangeTopmostLineEmitter.event;
|
||||
private readonly _onChanged = this._register(new vscode.EventEmitter<{ readonly resource: vscode.Uri, readonly line: number }>());
|
||||
public readonly onDidChanged = this._onChanged.event;
|
||||
|
||||
private updateLine(
|
||||
resource: vscode.Uri,
|
||||
|
@ -41,7 +36,7 @@ export class MarkdownFileTopmostLineMonitor {
|
|||
// schedule update
|
||||
setTimeout(() => {
|
||||
if (this.pendingUpdates.has(key)) {
|
||||
this._onDidChangeTopmostLineEmitter.fire({
|
||||
this._onChanged.fire({
|
||||
resource,
|
||||
line: this.pendingUpdates.get(key) as number
|
||||
});
|
||||
|
|
|
@ -4528,10 +4528,10 @@ typedarray@^0.0.6:
|
|||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
|
||||
|
||||
typescript@^3.6.4:
|
||||
version "3.6.4"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.4.tgz#b18752bb3792bc1a0281335f7f6ebf1bbfc5b91d"
|
||||
integrity sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg==
|
||||
typescript@^3.7.2:
|
||||
version "3.7.2"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.2.tgz#27e489b95fa5909445e9fef5ee48d81697ad18fb"
|
||||
integrity sha512-ml7V7JfiN2Xwvcer+XAf2csGO1bPBdRbFCkYBczNZggrBZ9c7G3riSUeJmqEU5uOtXNPMhE3n+R4FA/3YOAWOQ==
|
||||
|
||||
uc.micro@^1.0.1:
|
||||
version "1.0.3"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"config.npm.exclude": "Configure glob patterns for folders that should be excluded from automatic script detection.",
|
||||
"config.npm.enableScriptExplorer": "Enable an explorer view for npm scripts when there is no top-level 'package.json' file.",
|
||||
"config.npm.scriptExplorerAction": "The default click action used in the npm scripts explorer: `open` or `run`, the default is `open`.",
|
||||
"config.npm.enableRunFromFolder": "Enable running NPM scripts contained in a folder from the Explorer context menu.",
|
||||
"config.npm.enableRunFromFolder": "Enable running npm scripts contained in a folder from the Explorer context menu.",
|
||||
"config.npm.fetchOnlinePackageInfo": "Fetch data from https://registry.npmjs.org and https://registry.bower.io to provide auto-completion and information on hover features on npm dependencies.",
|
||||
"npm.parseError": "Npm task detection: failed to parse the file {0}",
|
||||
"taskdef.script": "The npm script to customize.",
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
"git": {
|
||||
"name": "atom/language-sass",
|
||||
"repositoryUrl": "https://github.com/atom/language-sass",
|
||||
"commitHash": "d01d29191ab323fb3cf8bde9df0429f8e07902ff"
|
||||
"commitHash": "f52ab12f7f9346cc2568129d8c4419bd3d506b47"
|
||||
}
|
||||
},
|
||||
"license": "MIT",
|
||||
"description": "The file syntaxes/scss.json was derived from the Atom package https://github.com/atom/language-sass which was originally converted from the TextMate bundle https://github.com/alexsancho/SASS.tmbundle.",
|
||||
"version": "0.62.0"
|
||||
"version": "0.62.1"
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
|
|
|
@ -4,13 +4,19 @@
|
|||
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
|
||||
"Once accepted there, we are happy to receive an update request."
|
||||
],
|
||||
"version": "https://github.com/atom/language-sass/commit/d01d29191ab323fb3cf8bde9df0429f8e07902ff",
|
||||
"version": "https://github.com/atom/language-sass/commit/f52ab12f7f9346cc2568129d8c4419bd3d506b47",
|
||||
"name": "SCSS",
|
||||
"scopeName": "source.css.scss",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#variable_setting"
|
||||
},
|
||||
{
|
||||
"include": "#at_rule_forward"
|
||||
},
|
||||
{
|
||||
"include": "#at_rule_use"
|
||||
},
|
||||
{
|
||||
"include": "#at_rule_include"
|
||||
},
|
||||
|
@ -239,6 +245,55 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"at_rule_forward": {
|
||||
"begin": "\\s*((@)forward\\b)\\s*",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.control.at-rule.forward.scss"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.keyword.scss"
|
||||
}
|
||||
},
|
||||
"end": "\\s*(?=;)",
|
||||
"name": "meta.at-rule.forward.scss",
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\b(as|hide|show)\\b",
|
||||
"name": "keyword.control.operator"
|
||||
},
|
||||
{
|
||||
"match": "\\b([\\w-]+)(\\*)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.other.attribute-name.module.scss"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.wildcard.scss"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "\\b[\\w-]+\\b",
|
||||
"name": "entity.name.function.scss"
|
||||
},
|
||||
{
|
||||
"include": "#variable"
|
||||
},
|
||||
{
|
||||
"include": "#string_single"
|
||||
},
|
||||
{
|
||||
"include": "#string_double"
|
||||
},
|
||||
{
|
||||
"include": "#comment_line"
|
||||
},
|
||||
{
|
||||
"include": "#comment_block"
|
||||
}
|
||||
]
|
||||
},
|
||||
"at_rule_function": {
|
||||
"patterns": [
|
||||
{
|
||||
|
@ -336,12 +391,18 @@
|
|||
"at_rule_include": {
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "(?<=@include)\\s+([\\w-]+)\\s*(\\()",
|
||||
"begin": "(?<=@include)\\s+(?:([\\w-]+)\\s*(\\.))?([\\w-]+)\\s*(\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.function.scss"
|
||||
"name": "variable.scss"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.access.module.scss"
|
||||
},
|
||||
"3": {
|
||||
"name": "entity.name.function.scss"
|
||||
},
|
||||
"4": {
|
||||
"name": "punctuation.definition.parameters.begin.bracket.round.scss"
|
||||
}
|
||||
},
|
||||
|
@ -359,12 +420,18 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"match": "(?<=@include)\\s+([\\w-]+)",
|
||||
"match": "(?<=@include)\\s+(?:([\\w-]+)\\s*(\\.))?([\\w-]+)",
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "meta.at-rule.include.scss"
|
||||
},
|
||||
"1": {
|
||||
"name": "variable.scss"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.access.module.scss"
|
||||
},
|
||||
"3": {
|
||||
"name": "entity.name.function.scss"
|
||||
}
|
||||
}
|
||||
|
@ -794,6 +861,64 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"at_rule_use": {
|
||||
"begin": "\\s*((@)use\\b)\\s*",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.control.at-rule.use.scss"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.keyword.scss"
|
||||
}
|
||||
},
|
||||
"end": "\\s*(?=;)",
|
||||
"name": "meta.at-rule.use.scss",
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\b(as|with)\\b",
|
||||
"name": "keyword.control.operator"
|
||||
},
|
||||
{
|
||||
"match": "\\b[\\w-]+\\b",
|
||||
"name": "variable.scss"
|
||||
},
|
||||
{
|
||||
"match": "\\*",
|
||||
"name": "variable.language.expanded-namespace.scss"
|
||||
},
|
||||
{
|
||||
"include": "#string_single"
|
||||
},
|
||||
{
|
||||
"include": "#string_double"
|
||||
},
|
||||
{
|
||||
"include": "#comment_line"
|
||||
},
|
||||
{
|
||||
"include": "#comment_block"
|
||||
},
|
||||
{
|
||||
"begin": "\\(",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.parameters.begin.bracket.round.scss"
|
||||
}
|
||||
},
|
||||
"end": "\\)",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.parameters.end.bracket.round.scss"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#function_attributes"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"at_rule_warn": {
|
||||
"begin": "\\s*((@)(warn|debug|error)\\b)\\s*",
|
||||
"captures": {
|
||||
|
@ -890,12 +1015,18 @@
|
|||
"name": "keyword.other.default.scss"
|
||||
},
|
||||
"constant_functions": {
|
||||
"begin": "([\\w-]+)(\\()",
|
||||
"begin": "(?:([\\w-]+)(\\.))?([\\w-]+)(\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "support.function.misc.scss"
|
||||
"name": "variable.scss"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.access.module.scss"
|
||||
},
|
||||
"3": {
|
||||
"name": "support.function.misc.scss"
|
||||
},
|
||||
"4": {
|
||||
"name": "punctuation.section.function.scss"
|
||||
}
|
||||
},
|
||||
|
@ -1050,10 +1181,10 @@
|
|||
"name": "variable.interpolation.scss",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#property_values"
|
||||
"include": "#variable"
|
||||
},
|
||||
{
|
||||
"include": "#variable"
|
||||
"include": "#property_values"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -1118,10 +1249,10 @@
|
|||
"include": "#map"
|
||||
},
|
||||
{
|
||||
"include": "#property_values"
|
||||
"include": "#variable"
|
||||
},
|
||||
{
|
||||
"include": "#variable"
|
||||
"include": "#property_values"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -1326,7 +1457,7 @@
|
|||
]
|
||||
},
|
||||
"selector_attribute": {
|
||||
"match": "(?xi)\n(\\[)\n\\s*\n(\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+?\n)\n(?:\n \\s*([~|^$*]?=)\\s*\n (?:\n (\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n )\n |\n ((\")(.*?)(\"))\n |\n ((')(.*?)('))\n )\n)?\n\\s*\n(\\])",
|
||||
"match": "(?xi)\n(\\[)\n\\s*\n(\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+?\n)\n(?:\n \\s*([~|^$*]?=)\\s*\n (?:\n (\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n )\n |\n ((\")(.*?)(\"))\n |\n ((')(.*?)('))\n )\n)?\n\\s*\n(\\])",
|
||||
"name": "meta.attribute-selector.scss",
|
||||
"captures": {
|
||||
"1": {
|
||||
|
@ -1421,7 +1552,7 @@
|
|||
}
|
||||
},
|
||||
"selector_class": {
|
||||
"match": "(?x)\n(\\.) # Valid class-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n | ; # - A semicolon\n)",
|
||||
"match": "(?x)\n(\\.) # Valid class-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,\\#)\\[:{>+~|] # - Another selector\n | \\.[^$] # - Class selector, negating module variable\n | /\\* # - A block comment\n | ; # - A semicolon\n)",
|
||||
"name": "entity.other.attribute-name.class.css",
|
||||
"captures": {
|
||||
"1": {
|
||||
|
@ -1449,7 +1580,7 @@
|
|||
"name": "entity.name.tag.custom.scss"
|
||||
},
|
||||
"selector_id": {
|
||||
"match": "(?x)\n(\\#) # Valid id-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n)",
|
||||
"match": "(?x)\n(\\#) # Valid id-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,\\#)\\[:{>+~|] # - Another selector\n | \\.[^$] # - Class selector, negating module variable\n | /\\* # - A block comment\n)",
|
||||
"name": "entity.other.attribute-name.id.css",
|
||||
"captures": {
|
||||
"1": {
|
||||
|
@ -1473,7 +1604,7 @@
|
|||
}
|
||||
},
|
||||
"selector_placeholder": {
|
||||
"match": "(?x)\n(%) # Valid placeholder-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= ; # - End of statement\n | $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n)",
|
||||
"match": "(?x)\n(%) # Valid placeholder-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.\\$ # Possible start of interpolation module scope variable\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= ; # - End of statement\n | $ # - End of the line\n | [\\s,\\#)\\[:{>+~|] # - Another selector\n | \\.[^$] # - Class selector, negating module variable\n | /\\* # - A block comment\n)",
|
||||
"name": "entity.other.attribute-name.placeholder.css",
|
||||
"captures": {
|
||||
"1": {
|
||||
|
@ -1723,8 +1854,26 @@
|
|||
]
|
||||
},
|
||||
"variables": {
|
||||
"match": "(\\$|\\-\\-)[A-Za-z0-9_-]+\\b",
|
||||
"name": "variable.scss"
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\b([\\w-]+)(\\.)(\\$[\\w-]+)\\b",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "variable.scss"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.access.module.scss"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.scss"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "(\\$|\\-\\-)[A-Za-z0-9_-]+\\b",
|
||||
"name": "variable.scss"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -252,6 +252,9 @@
|
|||
],
|
||||
"colors": {
|
||||
|
||||
"editor.background": "#000c18",
|
||||
"editor.foreground": "#6688cc",
|
||||
|
||||
// Base
|
||||
// "foreground": "",
|
||||
"focusBorder": "#596F99",
|
||||
|
@ -295,8 +298,6 @@
|
|||
"scrollbarSlider.hoverBackground": "#3B3F5188",
|
||||
|
||||
// Editor
|
||||
"editor.background": "#000c18",
|
||||
// "editor.foreground": "#6688cc",
|
||||
"editorWidget.background": "#262641",
|
||||
"editorCursor.foreground": "#ddbb88",
|
||||
"editorWhitespace.foreground": "#103050",
|
||||
|
|
|
@ -77,22 +77,6 @@
|
|||
"meta.import string.quoted": "other",
|
||||
"variable.other.jsdoc": "other"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scopeName": "documentation.injection.ts",
|
||||
"path": "./syntaxes/jsdoc.ts.injection.tmLanguage.json",
|
||||
"injectTo": [
|
||||
"source.ts",
|
||||
"source.tsx"
|
||||
]
|
||||
},
|
||||
{
|
||||
"scopeName": "documentation.injection.js.jsx",
|
||||
"path": "./syntaxes/jsdoc.js.injection.tmLanguage.json",
|
||||
"injectTo": [
|
||||
"source.js",
|
||||
"source.js.jsx"
|
||||
]
|
||||
}
|
||||
],
|
||||
"snippets": [
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
|
||||
{
|
||||
"injectionSelector": "L:comment.block.documentation",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#jsdocbody"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"jsdocbody": {
|
||||
"begin": "(?<=/\\*\\*)([^*]|\\*(?!/))*$",
|
||||
"while": "(^|\\G)\\s*\\*(?!/)(?=([^*]|[*](?!/))*$)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "text.html.markdown#fenced_code_block_js"
|
||||
},
|
||||
{
|
||||
"include": "text.html.markdown#fenced_code_block_ts"
|
||||
},
|
||||
{
|
||||
"include": "text.html.markdown#fenced_code_block_unknown"
|
||||
},
|
||||
{
|
||||
"include": "#example"
|
||||
},
|
||||
{
|
||||
"include": "source.ts#docblock"
|
||||
},
|
||||
{
|
||||
"include": "text.html.markdown#inline"
|
||||
}
|
||||
]
|
||||
},
|
||||
"example": {
|
||||
"begin": "((@)example)\\s+(?=([^*]|[*](?!/))*$).*$",
|
||||
"while": "(^|\\G)\\s(?!@)(?=([^*]|[*](?!/))*$)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.type.class.jsdoc"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.block.tag.jsdoc"
|
||||
}
|
||||
},
|
||||
"contentName": "meta.embedded.block.example.source.ts",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.js.jsx"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"scopeName": "documentation.injection.js.jsx"
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
|
||||
{
|
||||
"injectionSelector": "L:comment.block.documentation",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#jsdocbody"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"jsdocbody": {
|
||||
"begin": "(?<=/\\*\\*)([^*]|\\*(?!/))*$",
|
||||
"while": "(^|\\G)\\s*\\*(?!/)(?=([^*]|[*](?!/))*$)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "text.html.markdown#fenced_code_block_js"
|
||||
},
|
||||
{
|
||||
"include": "text.html.markdown#fenced_code_block_ts"
|
||||
},
|
||||
{
|
||||
"include": "text.html.markdown#fenced_code_block_unknown"
|
||||
},
|
||||
{
|
||||
"include": "#example"
|
||||
},
|
||||
{
|
||||
"include": "source.ts#docblock"
|
||||
},
|
||||
{
|
||||
"include": "text.html.markdown#inline"
|
||||
}
|
||||
]
|
||||
},
|
||||
"example": {
|
||||
"begin": "((@)example)\\s+(?=([^*]|[*](?!/))*$).*$",
|
||||
"while": "(^|\\G)\\s(?!@)(?=([^*]|[*](?!/))*$)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.type.class.jsdoc"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.block.tag.jsdoc"
|
||||
}
|
||||
},
|
||||
"contentName": "meta.embedded.block.example.source.ts",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.tsx"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"scopeName": "documentation.injection.ts"
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
/**
|
||||
* @example
|
||||
* 1 + 1
|
||||
*
|
||||
* @other
|
||||
* not colored
|
||||
*/
|
||||
const a = 1
|
|
@ -1,7 +0,0 @@
|
|||
/**
|
||||
* **Bold**
|
||||
* ```js
|
||||
* 1 + code
|
||||
* ```
|
||||
*/
|
||||
const a = 1
|
|
@ -1,277 +0,0 @@
|
|||
[
|
||||
{
|
||||
"c": "/**",
|
||||
"t": "source.ts comment.block.documentation.ts punctuation.definition.comment.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " * ",
|
||||
"t": "source.ts comment.block.documentation.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "@",
|
||||
"t": "source.ts comment.block.documentation.ts storage.type.class.jsdoc punctuation.definition.block.tag.jsdoc",
|
||||
"r": {
|
||||
"dark_plus": "storage.type: #569CD6",
|
||||
"light_plus": "storage.type: #0000FF",
|
||||
"dark_vs": "storage.type: #569CD6",
|
||||
"light_vs": "storage.type: #0000FF",
|
||||
"hc_black": "storage.type: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "example",
|
||||
"t": "source.ts comment.block.documentation.ts storage.type.class.jsdoc",
|
||||
"r": {
|
||||
"dark_plus": "storage.type: #569CD6",
|
||||
"light_plus": "storage.type: #0000FF",
|
||||
"dark_vs": "storage.type: #569CD6",
|
||||
"light_vs": "storage.type: #0000FF",
|
||||
"hc_black": "storage.type: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " *",
|
||||
"t": "source.ts comment.block.documentation.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.ts comment.block.documentation.ts meta.embedded.block.example.source.ts",
|
||||
"r": {
|
||||
"dark_plus": "meta.embedded: #D4D4D4",
|
||||
"light_plus": "meta.embedded: #000000",
|
||||
"dark_vs": "meta.embedded: #D4D4D4",
|
||||
"light_vs": "meta.embedded: #000000",
|
||||
"hc_black": "meta.embedded: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "1",
|
||||
"t": "source.ts comment.block.documentation.ts meta.embedded.block.example.source.ts constant.numeric.decimal.tsx",
|
||||
"r": {
|
||||
"dark_plus": "constant.numeric: #B5CEA8",
|
||||
"light_plus": "constant.numeric: #09885A",
|
||||
"dark_vs": "constant.numeric: #B5CEA8",
|
||||
"light_vs": "constant.numeric: #09885A",
|
||||
"hc_black": "constant.numeric: #B5CEA8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.ts comment.block.documentation.ts meta.embedded.block.example.source.ts",
|
||||
"r": {
|
||||
"dark_plus": "meta.embedded: #D4D4D4",
|
||||
"light_plus": "meta.embedded: #000000",
|
||||
"dark_vs": "meta.embedded: #D4D4D4",
|
||||
"light_vs": "meta.embedded: #000000",
|
||||
"hc_black": "meta.embedded: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "+",
|
||||
"t": "source.ts comment.block.documentation.ts meta.embedded.block.example.source.ts keyword.operator.arithmetic.tsx",
|
||||
"r": {
|
||||
"dark_plus": "keyword.operator: #D4D4D4",
|
||||
"light_plus": "keyword.operator: #000000",
|
||||
"dark_vs": "keyword.operator: #D4D4D4",
|
||||
"light_vs": "keyword.operator: #000000",
|
||||
"hc_black": "keyword.operator: #D4D4D4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.ts comment.block.documentation.ts meta.embedded.block.example.source.ts",
|
||||
"r": {
|
||||
"dark_plus": "meta.embedded: #D4D4D4",
|
||||
"light_plus": "meta.embedded: #000000",
|
||||
"dark_vs": "meta.embedded: #D4D4D4",
|
||||
"light_vs": "meta.embedded: #000000",
|
||||
"hc_black": "meta.embedded: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "1",
|
||||
"t": "source.ts comment.block.documentation.ts meta.embedded.block.example.source.ts constant.numeric.decimal.tsx",
|
||||
"r": {
|
||||
"dark_plus": "constant.numeric: #B5CEA8",
|
||||
"light_plus": "constant.numeric: #09885A",
|
||||
"dark_vs": "constant.numeric: #B5CEA8",
|
||||
"light_vs": "constant.numeric: #09885A",
|
||||
"hc_black": "constant.numeric: #B5CEA8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " *",
|
||||
"t": "source.ts comment.block.documentation.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " * ",
|
||||
"t": "source.ts comment.block.documentation.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "@",
|
||||
"t": "source.ts comment.block.documentation.ts storage.type.class.jsdoc punctuation.definition.block.tag.jsdoc",
|
||||
"r": {
|
||||
"dark_plus": "storage.type: #569CD6",
|
||||
"light_plus": "storage.type: #0000FF",
|
||||
"dark_vs": "storage.type: #569CD6",
|
||||
"light_vs": "storage.type: #0000FF",
|
||||
"hc_black": "storage.type: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "other",
|
||||
"t": "source.ts comment.block.documentation.ts storage.type.class.jsdoc",
|
||||
"r": {
|
||||
"dark_plus": "storage.type: #569CD6",
|
||||
"light_plus": "storage.type: #0000FF",
|
||||
"dark_vs": "storage.type: #569CD6",
|
||||
"light_vs": "storage.type: #0000FF",
|
||||
"hc_black": "storage.type: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " * not colored",
|
||||
"t": "source.ts comment.block.documentation.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.ts comment.block.documentation.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "*/",
|
||||
"t": "source.ts comment.block.documentation.ts punctuation.definition.comment.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "const",
|
||||
"t": "source.ts meta.var.expr.ts storage.type.ts",
|
||||
"r": {
|
||||
"dark_plus": "storage.type: #569CD6",
|
||||
"light_plus": "storage.type: #0000FF",
|
||||
"dark_vs": "storage.type: #569CD6",
|
||||
"light_vs": "storage.type: #0000FF",
|
||||
"hc_black": "storage.type: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.ts meta.var.expr.ts",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "a",
|
||||
"t": "source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.definition.variable.ts variable.other.constant.ts",
|
||||
"r": {
|
||||
"dark_plus": "variable: #9CDCFE",
|
||||
"light_plus": "variable: #001080",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "variable: #9CDCFE"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.ts meta.var.expr.ts meta.var-single-variable.expr.ts",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "=",
|
||||
"t": "source.ts meta.var.expr.ts keyword.operator.assignment.ts",
|
||||
"r": {
|
||||
"dark_plus": "keyword.operator: #D4D4D4",
|
||||
"light_plus": "keyword.operator: #000000",
|
||||
"dark_vs": "keyword.operator: #D4D4D4",
|
||||
"light_vs": "keyword.operator: #000000",
|
||||
"hc_black": "keyword.operator: #D4D4D4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.ts meta.var.expr.ts",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "1",
|
||||
"t": "source.ts meta.var.expr.ts constant.numeric.decimal.ts",
|
||||
"r": {
|
||||
"dark_plus": "constant.numeric: #B5CEA8",
|
||||
"light_plus": "constant.numeric: #09885A",
|
||||
"dark_vs": "constant.numeric: #B5CEA8",
|
||||
"light_vs": "constant.numeric: #09885A",
|
||||
"hc_black": "constant.numeric: #B5CEA8"
|
||||
}
|
||||
}
|
||||
]
|
|
@ -1,310 +0,0 @@
|
|||
[
|
||||
{
|
||||
"c": "/**",
|
||||
"t": "source.ts comment.block.documentation.ts punctuation.definition.comment.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " * ",
|
||||
"t": "source.ts comment.block.documentation.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "**",
|
||||
"t": "source.ts comment.block.documentation.ts markup.bold.markdown punctuation.definition.bold.markdown",
|
||||
"r": {
|
||||
"dark_plus": "markup.bold: #569CD6",
|
||||
"light_plus": "markup.bold: #000080",
|
||||
"dark_vs": "markup.bold: #569CD6",
|
||||
"light_vs": "markup.bold: #000080",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "Bold",
|
||||
"t": "source.ts comment.block.documentation.ts markup.bold.markdown",
|
||||
"r": {
|
||||
"dark_plus": "markup.bold: #569CD6",
|
||||
"light_plus": "markup.bold: #000080",
|
||||
"dark_vs": "markup.bold: #569CD6",
|
||||
"light_vs": "markup.bold: #000080",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "**",
|
||||
"t": "source.ts comment.block.documentation.ts markup.bold.markdown punctuation.definition.bold.markdown",
|
||||
"r": {
|
||||
"dark_plus": "markup.bold: #569CD6",
|
||||
"light_plus": "markup.bold: #000080",
|
||||
"dark_vs": "markup.bold: #569CD6",
|
||||
"light_vs": "markup.bold: #000080",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " *",
|
||||
"t": "source.ts comment.block.documentation.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.ts comment.block.documentation.ts markup.fenced_code.block.markdown",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "```",
|
||||
"t": "source.ts comment.block.documentation.ts markup.fenced_code.block.markdown punctuation.definition.markdown",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "js",
|
||||
"t": "source.ts comment.block.documentation.ts markup.fenced_code.block.markdown fenced_code.block.language.markdown",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " *",
|
||||
"t": "source.ts comment.block.documentation.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.ts comment.block.documentation.ts markup.fenced_code.block.markdown meta.embedded.block.javascript",
|
||||
"r": {
|
||||
"dark_plus": "meta.embedded: #D4D4D4",
|
||||
"light_plus": "meta.embedded: #000000",
|
||||
"dark_vs": "meta.embedded: #D4D4D4",
|
||||
"light_vs": "meta.embedded: #000000",
|
||||
"hc_black": "meta.embedded: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "1",
|
||||
"t": "source.ts comment.block.documentation.ts markup.fenced_code.block.markdown meta.embedded.block.javascript constant.numeric.decimal.js",
|
||||
"r": {
|
||||
"dark_plus": "constant.numeric: #B5CEA8",
|
||||
"light_plus": "constant.numeric: #09885A",
|
||||
"dark_vs": "constant.numeric: #B5CEA8",
|
||||
"light_vs": "constant.numeric: #09885A",
|
||||
"hc_black": "constant.numeric: #B5CEA8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.ts comment.block.documentation.ts markup.fenced_code.block.markdown meta.embedded.block.javascript",
|
||||
"r": {
|
||||
"dark_plus": "meta.embedded: #D4D4D4",
|
||||
"light_plus": "meta.embedded: #000000",
|
||||
"dark_vs": "meta.embedded: #D4D4D4",
|
||||
"light_vs": "meta.embedded: #000000",
|
||||
"hc_black": "meta.embedded: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "+",
|
||||
"t": "source.ts comment.block.documentation.ts markup.fenced_code.block.markdown meta.embedded.block.javascript keyword.operator.arithmetic.js",
|
||||
"r": {
|
||||
"dark_plus": "keyword.operator: #D4D4D4",
|
||||
"light_plus": "keyword.operator: #000000",
|
||||
"dark_vs": "keyword.operator: #D4D4D4",
|
||||
"light_vs": "keyword.operator: #000000",
|
||||
"hc_black": "keyword.operator: #D4D4D4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.ts comment.block.documentation.ts markup.fenced_code.block.markdown meta.embedded.block.javascript",
|
||||
"r": {
|
||||
"dark_plus": "meta.embedded: #D4D4D4",
|
||||
"light_plus": "meta.embedded: #000000",
|
||||
"dark_vs": "meta.embedded: #D4D4D4",
|
||||
"light_vs": "meta.embedded: #000000",
|
||||
"hc_black": "meta.embedded: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "code",
|
||||
"t": "source.ts comment.block.documentation.ts markup.fenced_code.block.markdown meta.embedded.block.javascript variable.other.readwrite.js",
|
||||
"r": {
|
||||
"dark_plus": "variable: #9CDCFE",
|
||||
"light_plus": "variable: #001080",
|
||||
"dark_vs": "meta.embedded: #D4D4D4",
|
||||
"light_vs": "meta.embedded: #000000",
|
||||
"hc_black": "variable: #9CDCFE"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " *",
|
||||
"t": "source.ts comment.block.documentation.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.ts comment.block.documentation.ts markup.fenced_code.block.markdown",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "```",
|
||||
"t": "source.ts comment.block.documentation.ts markup.fenced_code.block.markdown punctuation.definition.markdown",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.ts comment.block.documentation.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "*/",
|
||||
"t": "source.ts comment.block.documentation.ts punctuation.definition.comment.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "const",
|
||||
"t": "source.ts meta.var.expr.ts storage.type.ts",
|
||||
"r": {
|
||||
"dark_plus": "storage.type: #569CD6",
|
||||
"light_plus": "storage.type: #0000FF",
|
||||
"dark_vs": "storage.type: #569CD6",
|
||||
"light_vs": "storage.type: #0000FF",
|
||||
"hc_black": "storage.type: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.ts meta.var.expr.ts",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "a",
|
||||
"t": "source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.definition.variable.ts variable.other.constant.ts",
|
||||
"r": {
|
||||
"dark_plus": "variable: #9CDCFE",
|
||||
"light_plus": "variable: #001080",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "variable: #9CDCFE"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.ts meta.var.expr.ts meta.var-single-variable.expr.ts",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "=",
|
||||
"t": "source.ts meta.var.expr.ts keyword.operator.assignment.ts",
|
||||
"r": {
|
||||
"dark_plus": "keyword.operator: #D4D4D4",
|
||||
"light_plus": "keyword.operator: #000000",
|
||||
"dark_vs": "keyword.operator: #D4D4D4",
|
||||
"light_vs": "keyword.operator: #000000",
|
||||
"hc_black": "keyword.operator: #D4D4D4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "source.ts meta.var.expr.ts",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "1",
|
||||
"t": "source.ts meta.var.expr.ts constant.numeric.decimal.ts",
|
||||
"r": {
|
||||
"dark_plus": "constant.numeric: #B5CEA8",
|
||||
"light_plus": "constant.numeric: #09885A",
|
||||
"dark_vs": "constant.numeric: #B5CEA8",
|
||||
"light_vs": "constant.numeric: #09885A",
|
||||
"hc_black": "constant.numeric: #B5CEA8"
|
||||
}
|
||||
}
|
||||
]
|
|
@ -77,18 +77,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"c": " *",
|
||||
"t": "source.ts comment.block.documentation.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " id: number,",
|
||||
"c": " * id: number,",
|
||||
"t": "source.ts comment.block.documentation.ts entity.name.type.instance.jsdoc",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.type: #4EC9B0",
|
||||
|
@ -99,18 +88,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"c": " *",
|
||||
"t": "source.ts comment.block.documentation.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " fn: !Function,",
|
||||
"c": " * fn: !Function,",
|
||||
"t": "source.ts comment.block.documentation.ts entity.name.type.instance.jsdoc",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.type: #4EC9B0",
|
||||
|
@ -121,18 +99,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"c": " *",
|
||||
"t": "source.ts comment.block.documentation.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " context: (!Object|undefined)",
|
||||
"c": " * context: (!Object|undefined)",
|
||||
"t": "source.ts comment.block.documentation.ts entity.name.type.instance.jsdoc",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.type: #4EC9B0",
|
||||
|
@ -143,18 +110,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"c": " *",
|
||||
"t": "source.ts comment.block.documentation.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " }",
|
||||
"c": " * }",
|
||||
"t": "source.ts comment.block.documentation.ts entity.name.type.instance.jsdoc",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.type: #4EC9B0",
|
||||
|
@ -396,18 +352,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"c": " *",
|
||||
"t": "source.ts comment.block.documentation.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " measureTask: goog.dom.animationFrame.Task_,",
|
||||
"c": " * measureTask: goog.dom.animationFrame.Task_,",
|
||||
"t": "source.ts comment.block.documentation.ts entity.name.type.instance.jsdoc",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.type: #4EC9B0",
|
||||
|
@ -418,18 +363,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"c": " *",
|
||||
"t": "source.ts comment.block.documentation.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " mutateTask: goog.dom.animationFrame.Task_,",
|
||||
"c": " * mutateTask: goog.dom.animationFrame.Task_,",
|
||||
"t": "source.ts comment.block.documentation.ts entity.name.type.instance.jsdoc",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.type: #4EC9B0",
|
||||
|
@ -440,18 +374,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"c": " *",
|
||||
"t": "source.ts comment.block.documentation.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " state: (!Object|undefined),",
|
||||
"c": " * state: (!Object|undefined),",
|
||||
"t": "source.ts comment.block.documentation.ts entity.name.type.instance.jsdoc",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.type: #4EC9B0",
|
||||
|
@ -462,18 +385,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"c": " *",
|
||||
"t": "source.ts comment.block.documentation.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " args: (!Array|undefined),",
|
||||
"c": " * args: (!Array|undefined),",
|
||||
"t": "source.ts comment.block.documentation.ts entity.name.type.instance.jsdoc",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.type: #4EC9B0",
|
||||
|
@ -484,18 +396,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"c": " *",
|
||||
"t": "source.ts comment.block.documentation.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " isScheduled: boolean",
|
||||
"c": " * isScheduled: boolean",
|
||||
"t": "source.ts comment.block.documentation.ts entity.name.type.instance.jsdoc",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.type: #4EC9B0",
|
||||
|
@ -506,18 +407,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"c": " *",
|
||||
"t": "source.ts comment.block.documentation.ts",
|
||||
"r": {
|
||||
"dark_plus": "comment: #6A9955",
|
||||
"light_plus": "comment: #008000",
|
||||
"dark_vs": "comment: #6A9955",
|
||||
"light_vs": "comment: #008000",
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " }",
|
||||
"c": " * }",
|
||||
"t": "source.ts comment.block.documentation.ts entity.name.type.instance.jsdoc",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.type: #4EC9B0",
|
||||
|
|
|
@ -866,6 +866,71 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"codeActions": [
|
||||
{
|
||||
"languages": [
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"typescript",
|
||||
"typescriptreact"
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"kind": "refactor.extract.constant",
|
||||
"title": "%codeActions.refactor.extract.constant.title%",
|
||||
"description": "%codeActions.refactor.extract.constant.description%"
|
||||
},
|
||||
{
|
||||
"kind": "refactor.extract.function",
|
||||
"title": "%codeActions.refactor.extract.function.title%",
|
||||
"description": "%codeActions.refactor.extract.function.description%"
|
||||
},
|
||||
{
|
||||
"kind": "refactor.extract.interface",
|
||||
"title": "%codeActions.refactor.extract.interface.title%",
|
||||
"description": "%codeActions.refactor.extract.interface.description%"
|
||||
},
|
||||
{
|
||||
"kind": "refactor.extract.type",
|
||||
"title": "%codeActions.refactor.extract.type.title%",
|
||||
"description": "%codeActions.refactor.extract.type.description%"
|
||||
},
|
||||
{
|
||||
"kind": "refactor.rewrite.import",
|
||||
"title": "%codeActions.refactor.rewrite.import.title%",
|
||||
"description": "%codeActions.refactor.rewrite.import.description%"
|
||||
},
|
||||
{
|
||||
"kind": "refactor.rewrite.export",
|
||||
"title": "%codeActions.refactor.rewrite.export.title%",
|
||||
"description": "%codeActions.refactor.rewrite.export.description%"
|
||||
},
|
||||
{
|
||||
"kind": "refactor.rewrite.arrow.braces",
|
||||
"title": "%codeActions.refactor.rewrite.arrow.braces.title%",
|
||||
"description": "%codeActions.refactor.rewrite.arrow.braces.description%"
|
||||
},
|
||||
{
|
||||
"kind": "refactor.rewrite.parameters.toDestructured",
|
||||
"title": "%codeActions.refactor.rewrite.parameters.toDestructured.title%"
|
||||
},
|
||||
{
|
||||
"kind": "refactor.rewrite.property.generateAccessors",
|
||||
"title": "%codeActions.refactor.rewrite.property.generateAccessors.title%",
|
||||
"description": "%codeActions.refactor.rewrite.property.generateAccessors.description%"
|
||||
},
|
||||
{
|
||||
"kind": "refactor.move.newFile",
|
||||
"title": "%codeActions.refactor.move.newFile.title%",
|
||||
"description": "%codeActions.refactor.move.newFile.description%"
|
||||
},
|
||||
{
|
||||
"kind": "source.organizeImports",
|
||||
"title": "%codeActions.source.organizeImports.title%"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
"format.placeOpenBraceOnNewLineForFunctions": "Defines whether an open brace is put onto a new line for functions or not.",
|
||||
"format.placeOpenBraceOnNewLineForControlBlocks": "Defines whether an open brace is put onto a new line for control blocks or not.",
|
||||
"format.semicolons": "Defines handling of optional semicolons. Requires using TypeScript 3.7 or newer in the workspace.",
|
||||
"format.semicolons.ignore": "Don’t insert or remove any semicolons.",
|
||||
"format.semicolons.ignore": "Don't insert or remove any semicolons.",
|
||||
"format.semicolons.insert": "Insert semicolons at statement ends.",
|
||||
"format.semicolons.remove": "Remove unnecessary semicolons.",
|
||||
"javascript.validate.enable": "Enable/disable JavaScript validation.",
|
||||
|
@ -43,8 +43,8 @@
|
|||
"typescript.selectTypeScriptVersion.title": "Select TypeScript Version...",
|
||||
"typescript.reportStyleChecksAsWarnings": "Report style checks as warnings.",
|
||||
"javascript.implicitProjectConfig.checkJs": "Enable/disable semantic checking of JavaScript files. Existing jsconfig.json or tsconfig.json files override this setting. Requires using TypeScript 2.3.1 or newer in the workspace.",
|
||||
"typescript.npm": "Specifies the path to the NPM executable used for Automatic Type Acquisition. Requires using TypeScript 2.3.4 or newer in the workspace.",
|
||||
"typescript.check.npmIsInstalled": "Check if NPM is installed for Automatic Type Acquisition.",
|
||||
"typescript.npm": "Specifies the path to the npm executable used for Automatic Type Acquisition. Requires using TypeScript 2.3.4 or newer in the workspace.",
|
||||
"typescript.check.npmIsInstalled": "Check if npm is installed for Automatic Type Acquisition.",
|
||||
"configuration.suggest.names": "Enable/disable including unique names from the file in JavaScript suggestions. Note that name suggestions are always disabled in JavaScript code that is semantically checked using `@ts-check` or `checkJs`.",
|
||||
"typescript.tsc.autoDetect": "Controls auto detection of tsc tasks.",
|
||||
"typescript.tsc.autoDetect.off": "Disable this feature.",
|
||||
|
@ -75,5 +75,25 @@
|
|||
"typescript.suggest.enabled": "Enabled/disable autocomplete suggestions.",
|
||||
"configuration.surveys.enabled": "Enabled/disable occasional surveys that help us improve VS Code's JavaScript and TypeScript support.",
|
||||
"configuration.suggest.completeJSDocs": "Enable/disable suggestion to complete JSDoc comments.",
|
||||
"typescript.preferences.renameShorthandProperties": "Enable/disable introducing aliases for object shorthand properties during renames. Requires using TypeScript 3.4 or newer in the workspace."
|
||||
"typescript.preferences.renameShorthandProperties": "Enable/disable introducing aliases for object shorthand properties during renames. Requires using TypeScript 3.4 or newer in the workspace.",
|
||||
"codeActions.refactor.extract.constant.title": "Extract constant",
|
||||
"codeActions.refactor.extract.constant.description": "Extract expression to constant.",
|
||||
"codeActions.refactor.extract.function.title": "Extract function",
|
||||
"codeActions.refactor.extract.function.description": "Extract expression to method or function.",
|
||||
"codeActions.refactor.extract.type.title": "Extract type",
|
||||
"codeActions.refactor.extract.type.description": "Extract type to a type alias.",
|
||||
"codeActions.refactor.extract.interface.title": "Extract interface",
|
||||
"codeActions.refactor.extract.interface.description": "Extract type to an interface.",
|
||||
"codeActions.refactor.rewrite.import.title": "Convert import",
|
||||
"codeActions.refactor.rewrite.import.description": "Convert between named imports and namespace imports.",
|
||||
"codeActions.refactor.rewrite.export.title": "Convert export",
|
||||
"codeActions.refactor.rewrite.export.description": "Convert between default export and named export.",
|
||||
"codeActions.refactor.move.newFile.title": "Move to a new file",
|
||||
"codeActions.refactor.move.newFile.description": "Move the expression to a new file.",
|
||||
"codeActions.refactor.rewrite.arrow.braces.title": "Rewrite arrow braces",
|
||||
"codeActions.refactor.rewrite.arrow.braces.description": "Add or remove braces in an arrow function.",
|
||||
"codeActions.refactor.rewrite.parameters.toDestructured.title": "Convert parameters to destructured object",
|
||||
"codeActions.refactor.rewrite.property.generateAccessors.title": "Generate accessors",
|
||||
"codeActions.refactor.rewrite.property.generateAccessors.description": "Generate 'get' and 'set' accessors",
|
||||
"codeActions.source.organizeImports.title": "Organize imports"
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import * as vscode from 'vscode';
|
|||
import * as Proto from '../protocol';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import API from '../utils/api';
|
||||
import { coalesce } from '../utils/arrays';
|
||||
import { Delayer } from '../utils/async';
|
||||
import { nulToken } from '../utils/cancellation';
|
||||
import { Disposable } from '../utils/dispose';
|
||||
|
@ -117,7 +118,11 @@ class BufferSynchronizer {
|
|||
}
|
||||
}
|
||||
|
||||
public beforeCommand(command: string) {
|
||||
public reset(): void {
|
||||
this._pending.clear();
|
||||
}
|
||||
|
||||
public beforeCommand(command: string): void {
|
||||
if (command === 'updateOpen') {
|
||||
return;
|
||||
}
|
||||
|
@ -149,7 +154,7 @@ class BufferSynchronizer {
|
|||
}
|
||||
|
||||
private get supportsBatching(): boolean {
|
||||
return this.client.apiVersion.gte(API.v340) && vscode.workspace.getConfiguration('typescript', null).get<boolean>('useBatchedBufferSync', true);
|
||||
return this.client.apiVersion.gte(API.v340);
|
||||
}
|
||||
|
||||
private updatePending(resource: vscode.Uri, f: (pending: ResourceMap<CloseOperation | OpenOperation | ChangeOperation>) => void): void {
|
||||
|
@ -264,26 +269,23 @@ class GetErrRequest {
|
|||
files: ResourceMap<void>,
|
||||
onDone: () => void
|
||||
) {
|
||||
const token = new vscode.CancellationTokenSource();
|
||||
return new GetErrRequest(client, files, token, onDone);
|
||||
return new GetErrRequest(client, files, onDone);
|
||||
}
|
||||
|
||||
private _done: boolean = false;
|
||||
private readonly _token: vscode.CancellationTokenSource = new vscode.CancellationTokenSource();
|
||||
|
||||
private constructor(
|
||||
client: ITypeScriptServiceClient,
|
||||
public readonly files: ResourceMap<void>,
|
||||
private readonly _token: vscode.CancellationTokenSource,
|
||||
onDone: () => void
|
||||
) {
|
||||
const args: Proto.GeterrRequestArgs = {
|
||||
delay: 0,
|
||||
files: Array.from(files.entries)
|
||||
.map(entry => client.normalizedPath(entry.resource))
|
||||
.filter(x => !!x) as string[]
|
||||
files: coalesce(Array.from(files.entries).map(entry => client.normalizedPath(entry.resource)))
|
||||
};
|
||||
|
||||
client.executeAsync('geterr', args, _token.token)
|
||||
client.executeAsync('geterr', args, this._token.token)
|
||||
.finally(() => {
|
||||
if (this._done) {
|
||||
return;
|
||||
|
@ -338,6 +340,9 @@ export default class BufferSyncSupport extends Disposable {
|
|||
private readonly _onDelete = this._register(new vscode.EventEmitter<vscode.Uri>());
|
||||
public readonly onDelete = this._onDelete.event;
|
||||
|
||||
private readonly _onWillChange = this._register(new vscode.EventEmitter<vscode.Uri>());
|
||||
public readonly onWillChange = this._onWillChange.event;
|
||||
|
||||
public listen(): void {
|
||||
if (this.listening) {
|
||||
return;
|
||||
|
@ -392,7 +397,11 @@ export default class BufferSyncSupport extends Disposable {
|
|||
return vscode.Uri.file(filePath);
|
||||
}
|
||||
|
||||
public reOpenDocuments(): void {
|
||||
public reset(): void {
|
||||
this.pendingGetErr?.cancel();
|
||||
this.pendingDiagnostics.clear();
|
||||
this.synchronizer.reset();
|
||||
|
||||
for (const buffer of this.syncedBuffers.allBuffers) {
|
||||
buffer.open();
|
||||
}
|
||||
|
@ -425,6 +434,7 @@ export default class BufferSyncSupport extends Disposable {
|
|||
return;
|
||||
}
|
||||
this.pendingDiagnostics.delete(resource);
|
||||
this.pendingGetErr?.files.delete(resource);
|
||||
this.syncedBuffers.delete(resource);
|
||||
syncedBuffer.close();
|
||||
this._onDelete.fire(resource);
|
||||
|
@ -457,6 +467,8 @@ export default class BufferSyncSupport extends Disposable {
|
|||
return;
|
||||
}
|
||||
|
||||
this._onWillChange.fire(syncedBuffer.resource);
|
||||
|
||||
syncedBuffer.onContentChanged(e.contentChanges);
|
||||
const didTrigger = this.requestDiagnostic(syncedBuffer);
|
||||
|
||||
|
@ -518,8 +530,10 @@ export default class BufferSyncSupport extends Disposable {
|
|||
if (this.pendingGetErr) {
|
||||
this.pendingGetErr.cancel();
|
||||
|
||||
for (const file of this.pendingGetErr.files.entries) {
|
||||
orderedFileSet.set(file.resource, undefined);
|
||||
for (const { resource } of this.pendingGetErr.files.entries) {
|
||||
if (this.syncedBuffers.get(resource)) {
|
||||
orderedFileSet.set(resource, undefined);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -66,12 +66,13 @@ class TypeScriptDocumentSymbolProvider implements vscode.DocumentSymbolProvider
|
|||
const children = new Set(item.childItems || []);
|
||||
for (const span of item.spans) {
|
||||
const range = typeConverters.Range.fromTextSpan(span);
|
||||
const selectionRange = item.nameSpan ? typeConverters.Range.fromTextSpan(item.nameSpan) : range;
|
||||
const symbolInfo = new vscode.DocumentSymbol(
|
||||
item.text,
|
||||
'',
|
||||
getSymbolKind(item.kind),
|
||||
range,
|
||||
range);
|
||||
range.contains(selectionRange) ? selectionRange : range);
|
||||
|
||||
for (const child of children) {
|
||||
if (child.spans.some(span => !!range.intersection(typeConverters.Range.fromTextSpan(span)))) {
|
||||
|
|
|
@ -22,8 +22,10 @@ const autoFixableDiagnosticCodes = new Set<number>([
|
|||
|
||||
class TypeScriptAutoFixProvider implements vscode.CodeActionProvider {
|
||||
|
||||
private static readonly kind = vscode.CodeActionKind.SourceFixAll.append('ts');
|
||||
|
||||
public static readonly metadata: vscode.CodeActionProviderMetadata = {
|
||||
providedCodeActionKinds: [vscode.CodeActionKind.SourceFixAll]
|
||||
providedCodeActionKinds: [TypeScriptAutoFixProvider.kind]
|
||||
};
|
||||
|
||||
constructor(
|
||||
|
@ -82,7 +84,7 @@ class TypeScriptAutoFixProvider implements vscode.CodeActionProvider {
|
|||
const { edit, fixedDiagnostics } = autoFixResponse;
|
||||
const codeAction = new vscode.CodeAction(
|
||||
localize('autoFix.label', 'Auto fix'),
|
||||
vscode.CodeActionKind.SourceFixAll);
|
||||
TypeScriptAutoFixProvider.kind);
|
||||
codeAction.edit = edit;
|
||||
codeAction.diagnostics = fixedDiagnostics;
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import * as vscode from 'vscode';
|
|||
import * as Proto from '../protocol';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import API from '../utils/api';
|
||||
import { coalesce } from '../utils/arrays';
|
||||
import { VersionDependentRegistration } from '../utils/dependentRegistration';
|
||||
import * as typeConverters from '../utils/typeConverters';
|
||||
|
||||
|
@ -33,9 +34,7 @@ class TypeScriptFoldingProvider implements vscode.FoldingRangeProvider {
|
|||
return;
|
||||
}
|
||||
|
||||
return response.body
|
||||
.map(span => this.convertOutliningSpan(span, document))
|
||||
.filter(foldingRange => !!foldingRange) as vscode.FoldingRange[];
|
||||
return coalesce(response.body.map(span => this.convertOutliningSpan(span, document)));
|
||||
}
|
||||
|
||||
private convertOutliningSpan(
|
||||
|
|
|
@ -24,7 +24,7 @@ export default class TypeScriptImplementationsCodeLensProvider extends TypeScrip
|
|||
const codeLens = inputCodeLens as ReferencesCodeLens;
|
||||
|
||||
const args = typeConverters.Position.toFileLocationRequestArgs(codeLens.file, codeLens.range.start);
|
||||
const response = await this.client.execute('implementation', args, token, { lowPriority: true });
|
||||
const response = await this.client.execute('implementation', args, token, { lowPriority: true, cancelOnResourceChange: codeLens.document });
|
||||
if (response.type !== 'response' || !response.body) {
|
||||
codeLens.command = response.type === 'cancelled'
|
||||
? TypeScriptBaseCodeLensProvider.cancelledCommand
|
||||
|
|
|
@ -123,14 +123,77 @@ class SelectRefactorCommand implements Command {
|
|||
}
|
||||
}
|
||||
|
||||
interface CodeActionKind {
|
||||
readonly kind: vscode.CodeActionKind;
|
||||
matches(refactor: Proto.RefactorActionInfo): boolean;
|
||||
}
|
||||
|
||||
const Extract_Function = Object.freeze<CodeActionKind>({
|
||||
kind: vscode.CodeActionKind.RefactorExtract.append('function'),
|
||||
matches: refactor => refactor.name.startsWith('function_')
|
||||
});
|
||||
|
||||
const Extract_Constant = Object.freeze<CodeActionKind>({
|
||||
kind: vscode.CodeActionKind.RefactorExtract.append('constant'),
|
||||
matches: refactor => refactor.name.startsWith('constant_')
|
||||
});
|
||||
|
||||
const Extract_Type = Object.freeze<CodeActionKind>({
|
||||
kind: vscode.CodeActionKind.RefactorExtract.append('type'),
|
||||
matches: refactor => refactor.name.startsWith('Extract to type alias')
|
||||
});
|
||||
|
||||
const Extract_Interface = Object.freeze<CodeActionKind>({
|
||||
kind: vscode.CodeActionKind.RefactorExtract.append('interface'),
|
||||
matches: refactor => refactor.name.startsWith('Extract to interface')
|
||||
});
|
||||
|
||||
const Move_NewFile = Object.freeze<CodeActionKind>({
|
||||
kind: vscode.CodeActionKind.Refactor.append('move').append('newFile'),
|
||||
matches: refactor => refactor.name.startsWith('Move to a new file')
|
||||
});
|
||||
|
||||
const Rewrite_Import = Object.freeze<CodeActionKind>({
|
||||
kind: vscode.CodeActionKind.RefactorRewrite.append('import'),
|
||||
matches: refactor => refactor.name.startsWith('Convert namespace import') || refactor.name.startsWith('Convert named imports')
|
||||
});
|
||||
|
||||
const Rewrite_Export = Object.freeze<CodeActionKind>({
|
||||
kind: vscode.CodeActionKind.RefactorRewrite.append('export'),
|
||||
matches: refactor => refactor.name.startsWith('Convert default export') || refactor.name.startsWith('Convert named export')
|
||||
});
|
||||
|
||||
const Rewrite_Arrow_Braces = Object.freeze<CodeActionKind>({
|
||||
kind: vscode.CodeActionKind.RefactorRewrite.append('arrow').append('braces'),
|
||||
matches: refactor => refactor.name.startsWith('Convert default export') || refactor.name.startsWith('Convert named export')
|
||||
});
|
||||
|
||||
const Rewrite_Parameters_ToDestructured = Object.freeze<CodeActionKind>({
|
||||
kind: vscode.CodeActionKind.RefactorRewrite.append('parameters').append('toDestructured'),
|
||||
matches: refactor => refactor.name.startsWith('Convert parameters to destructured object')
|
||||
});
|
||||
|
||||
const Rewrite_Property_GenerateAccessors = Object.freeze<CodeActionKind>({
|
||||
kind: vscode.CodeActionKind.RefactorRewrite.append('property').append('generateAccessors'),
|
||||
matches: refactor => refactor.name.startsWith('Generate \'get\' and \'set\' accessors')
|
||||
});
|
||||
|
||||
const allKnownCodeActionKinds = [
|
||||
Extract_Function,
|
||||
Extract_Constant,
|
||||
Extract_Type,
|
||||
Extract_Interface,
|
||||
Move_NewFile,
|
||||
Rewrite_Import,
|
||||
Rewrite_Export,
|
||||
Rewrite_Arrow_Braces,
|
||||
Rewrite_Parameters_ToDestructured,
|
||||
Rewrite_Property_GenerateAccessors
|
||||
];
|
||||
|
||||
class TypeScriptRefactorProvider implements vscode.CodeActionProvider {
|
||||
public static readonly minVersion = API.v240;
|
||||
|
||||
private static readonly extractFunctionKind = vscode.CodeActionKind.RefactorExtract.append('function');
|
||||
private static readonly extractConstantKind = vscode.CodeActionKind.RefactorExtract.append('constant');
|
||||
private static readonly extractTypeKind = vscode.CodeActionKind.RefactorExtract.append('type');
|
||||
private static readonly moveKind = vscode.CodeActionKind.Refactor.append('move');
|
||||
|
||||
constructor(
|
||||
private readonly client: ITypeScriptServiceClient,
|
||||
private readonly formattingOptionsManager: FormattingOptionsManager,
|
||||
|
@ -142,7 +205,10 @@ class TypeScriptRefactorProvider implements vscode.CodeActionProvider {
|
|||
}
|
||||
|
||||
public static readonly metadata: vscode.CodeActionProviderMetadata = {
|
||||
providedCodeActionKinds: [vscode.CodeActionKind.Refactor],
|
||||
providedCodeActionKinds: [
|
||||
vscode.CodeActionKind.Refactor,
|
||||
...allKnownCodeActionKinds.map(x => x.kind),
|
||||
],
|
||||
};
|
||||
|
||||
public async provideCodeActions(
|
||||
|
@ -168,7 +234,7 @@ class TypeScriptRefactorProvider implements vscode.CodeActionProvider {
|
|||
const args: Proto.GetApplicableRefactorsRequestArgs = typeConverters.Range.toFileRangeRequestArgs(file, rangeOrSelection);
|
||||
return this.client.execute('getApplicableRefactors', args, token);
|
||||
});
|
||||
if (!response || response.type !== 'response' || !response.body) {
|
||||
if (response?.type !== 'response' || !response.body) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
@ -224,25 +290,17 @@ class TypeScriptRefactorProvider implements vscode.CodeActionProvider {
|
|||
}
|
||||
|
||||
private static getKind(refactor: Proto.RefactorActionInfo) {
|
||||
if (refactor.name.startsWith('function_')) {
|
||||
return TypeScriptRefactorProvider.extractFunctionKind;
|
||||
} else if (refactor.name.startsWith('constant_')) {
|
||||
return TypeScriptRefactorProvider.extractConstantKind;
|
||||
} else if (refactor.name.startsWith('Move')) {
|
||||
return TypeScriptRefactorProvider.moveKind;
|
||||
} else if (refactor.name.includes('Extract to type alias')) {
|
||||
return TypeScriptRefactorProvider.extractTypeKind;
|
||||
}
|
||||
return vscode.CodeActionKind.Refactor;
|
||||
const match = allKnownCodeActionKinds.find(kind => kind.matches(refactor));
|
||||
return match ? match.kind : vscode.CodeActionKind.Refactor;
|
||||
}
|
||||
|
||||
private static isPreferred(
|
||||
action: Proto.RefactorActionInfo
|
||||
): boolean {
|
||||
if (action.name.startsWith('constant_')) {
|
||||
if (Extract_Constant.matches(action)) {
|
||||
return action.name.endsWith('scope_0');
|
||||
}
|
||||
if (action.name.includes('Extract to type alias')) {
|
||||
if (Extract_Type.matches(action) || Extract_Interface.matches(action)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -19,7 +19,7 @@ class TypeScriptReferencesCodeLensProvider extends TypeScriptBaseCodeLensProvide
|
|||
public async resolveCodeLens(inputCodeLens: vscode.CodeLens, token: vscode.CancellationToken): Promise<vscode.CodeLens> {
|
||||
const codeLens = inputCodeLens as ReferencesCodeLens;
|
||||
const args = typeConverters.Position.toFileLocationRequestArgs(codeLens.file, codeLens.range.start);
|
||||
const response = await this.client.execute('references', args, token, { lowPriority: true });
|
||||
const response = await this.client.execute('references', args, token, { lowPriority: true, cancelOnResourceChange: codeLens.document });
|
||||
if (response.type !== 'response' || !response.body) {
|
||||
codeLens.command = response.type === 'cancelled'
|
||||
? TypeScriptBaseCodeLensProvider.cancelledCommand
|
||||
|
|
|
@ -3,12 +3,11 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as fs from 'fs';
|
||||
import * as jsonc from 'jsonc-parser';
|
||||
import * as path from 'path';
|
||||
import * as vscode from 'vscode';
|
||||
import * as nls from 'vscode-nls';
|
||||
import { ITypeScriptServiceClient } from '../typescriptService';
|
||||
import { ITypeScriptServiceClient, ServerResponse } from '../typescriptService';
|
||||
import { isTsConfigFileName } from '../utils/languageDescription';
|
||||
import { Lazy } from '../utils/lazy';
|
||||
import { isImplicitProjectConfigFile } from '../utils/tsconfig';
|
||||
|
@ -18,14 +17,14 @@ const localize = nls.loadMessageBundle();
|
|||
|
||||
type AutoDetect = 'on' | 'off' | 'build' | 'watch';
|
||||
|
||||
|
||||
const exists = (file: string): Promise<boolean> =>
|
||||
new Promise<boolean>((resolve, _reject) => {
|
||||
fs.exists(file, (value: boolean) => {
|
||||
resolve(value);
|
||||
});
|
||||
});
|
||||
|
||||
const exists = async (resource: vscode.Uri): Promise<boolean> => {
|
||||
try {
|
||||
const stat = await vscode.workspace.fs.stat(resource);
|
||||
return stat.type === vscode.FileType.File;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
interface TypeScriptTaskDefinition extends vscode.TaskDefinition {
|
||||
tsconfig: string;
|
||||
|
@ -36,6 +35,8 @@ interface TypeScriptTaskDefinition extends vscode.TaskDefinition {
|
|||
* Provides tasks for building `tsconfig.json` files in a project.
|
||||
*/
|
||||
export default class TscTaskProvider implements vscode.TaskProvider {
|
||||
|
||||
private readonly projectInfoRequestTimeout = 2000;
|
||||
private autoDetect: AutoDetect = 'on';
|
||||
private readonly tsconfigProvider: TsConfigProvider;
|
||||
private readonly disposables: vscode.Disposable[] = [];
|
||||
|
@ -62,8 +63,8 @@ export default class TscTaskProvider implements vscode.TaskProvider {
|
|||
const configPaths: Set<string> = new Set();
|
||||
const tasks: vscode.Task[] = [];
|
||||
for (const project of await this.getAllTsConfigs(token)) {
|
||||
if (!configPaths.has(project.path)) {
|
||||
configPaths.add(project.path);
|
||||
if (!configPaths.has(project.fsPath)) {
|
||||
configPaths.add(project.fsPath);
|
||||
tasks.push(...(await this.getTasksForProject(project)));
|
||||
}
|
||||
}
|
||||
|
@ -88,7 +89,8 @@ export default class TscTaskProvider implements vscode.TaskProvider {
|
|||
const kind: TypeScriptTaskDefinition = (<any>_task.definition);
|
||||
const tsconfigUri: vscode.Uri = _task.scope.uri.with({ path: _task.scope.uri.path + '/' + kind.tsconfig });
|
||||
const tsconfig: TSConfig = {
|
||||
path: tsconfigUri.fsPath,
|
||||
uri: tsconfigUri,
|
||||
fsPath: tsconfigUri.fsPath,
|
||||
posixPath: tsconfigUri.path,
|
||||
workspaceFolder: _task.scope
|
||||
};
|
||||
|
@ -104,7 +106,7 @@ export default class TscTaskProvider implements vscode.TaskProvider {
|
|||
...await this.getTsConfigsInWorkspace()
|
||||
];
|
||||
for (const config of configs) {
|
||||
if (await exists(config.path)) {
|
||||
if (await exists(config.uri)) {
|
||||
out.add(config);
|
||||
}
|
||||
}
|
||||
|
@ -117,7 +119,8 @@ export default class TscTaskProvider implements vscode.TaskProvider {
|
|||
if (isTsConfigFileName(editor.document.fileName)) {
|
||||
const uri = editor.document.uri;
|
||||
return [{
|
||||
path: uri.fsPath,
|
||||
uri,
|
||||
fsPath: uri.fsPath,
|
||||
posixPath: uri.path,
|
||||
workspaceFolder: vscode.workspace.getWorkspaceFolder(uri)
|
||||
}];
|
||||
|
@ -129,10 +132,13 @@ export default class TscTaskProvider implements vscode.TaskProvider {
|
|||
return [];
|
||||
}
|
||||
|
||||
const response = await this.client.value.execute(
|
||||
'projectInfo',
|
||||
{ file, needFileNameList: false },
|
||||
token);
|
||||
const response = await Promise.race([
|
||||
this.client.value.execute(
|
||||
'projectInfo',
|
||||
{ file, needFileNameList: false },
|
||||
token),
|
||||
new Promise<typeof ServerResponse.NoContent>(resolve => setTimeout(() => resolve(ServerResponse.NoContent), this.projectInfoRequestTimeout))
|
||||
]);
|
||||
if (response.type !== 'response' || !response.body) {
|
||||
return [];
|
||||
}
|
||||
|
@ -143,7 +149,8 @@ export default class TscTaskProvider implements vscode.TaskProvider {
|
|||
const uri = vscode.Uri.file(normalizedConfigPath);
|
||||
const folder = vscode.workspace.getWorkspaceFolder(uri);
|
||||
return [{
|
||||
path: normalizedConfigPath,
|
||||
uri,
|
||||
fsPath: normalizedConfigPath,
|
||||
posixPath: uri.path,
|
||||
workspaceFolder: folder
|
||||
}];
|
||||
|
@ -158,7 +165,7 @@ export default class TscTaskProvider implements vscode.TaskProvider {
|
|||
|
||||
private static async getCommand(project: TSConfig): Promise<string> {
|
||||
if (project.workspaceFolder) {
|
||||
const localTsc = await TscTaskProvider.getLocalTscAtPath(path.dirname(project.path));
|
||||
const localTsc = await TscTaskProvider.getLocalTscAtPath(path.dirname(project.fsPath));
|
||||
if (localTsc) {
|
||||
return localTsc;
|
||||
}
|
||||
|
@ -176,9 +183,9 @@ export default class TscTaskProvider implements vscode.TaskProvider {
|
|||
private static async getLocalTscAtPath(folderPath: string): Promise<string | undefined> {
|
||||
const platform = process.platform;
|
||||
const bin = path.join(folderPath, 'node_modules', '.bin');
|
||||
if (platform === 'win32' && await exists(path.join(bin, 'tsc.cmd'))) {
|
||||
if (platform === 'win32' && await exists(vscode.Uri.file(path.join(bin, 'tsc.cmd')))) {
|
||||
return path.join(bin, 'tsc.cmd');
|
||||
} else if ((platform === 'linux' || platform === 'darwin') && await exists(path.join(bin, 'tsc'))) {
|
||||
} else if ((platform === 'linux' || platform === 'darwin') && await exists(vscode.Uri.file(path.join(bin, 'tsc')))) {
|
||||
return path.join(bin, 'tsc');
|
||||
}
|
||||
return undefined;
|
||||
|
@ -196,7 +203,7 @@ export default class TscTaskProvider implements vscode.TaskProvider {
|
|||
}
|
||||
|
||||
private getBuildTask(workspaceFolder: vscode.WorkspaceFolder | undefined, label: string, command: string, args: string[], buildTaskidentifier: TypeScriptTaskDefinition): vscode.Task {
|
||||
const buildTask = new vscode.Task(
|
||||
const buildTask = new vscode.Task2(
|
||||
buildTaskidentifier,
|
||||
workspaceFolder || vscode.TaskScope.Workspace,
|
||||
localize('buildTscLabel', 'build - {0}', label),
|
||||
|
@ -233,7 +240,6 @@ export default class TscTaskProvider implements vscode.TaskProvider {
|
|||
}
|
||||
|
||||
if (this.autoDetect === 'watch' || this.autoDetect === 'on') {
|
||||
|
||||
tasks.push(this.getWatchTask(project.workspaceFolder, label, command, args, { type: 'typescript', tsconfig: label, option: 'watch' }));
|
||||
}
|
||||
|
||||
|
@ -256,25 +262,19 @@ export default class TscTaskProvider implements vscode.TaskProvider {
|
|||
return task;
|
||||
}
|
||||
|
||||
private getBuildShellArgs(project: TSConfig): Promise<Array<string>> {
|
||||
const defaultArgs = ['-p', project.path];
|
||||
return new Promise<Array<string>>((resolve) => {
|
||||
fs.readFile(project.path, (error, result) => {
|
||||
if (error) {
|
||||
return resolve(defaultArgs);
|
||||
}
|
||||
|
||||
try {
|
||||
const tsconfig = jsonc.parse(result.toString());
|
||||
if (tsconfig.references) {
|
||||
return resolve(['-b', project.path]);
|
||||
}
|
||||
} catch {
|
||||
// noop
|
||||
}
|
||||
return resolve(defaultArgs);
|
||||
});
|
||||
});
|
||||
private async getBuildShellArgs(project: TSConfig): Promise<Array<string>> {
|
||||
const defaultArgs = ['-p', project.fsPath];
|
||||
try {
|
||||
const bytes = await vscode.workspace.fs.readFile(project.uri);
|
||||
const text = Buffer.from(bytes).toString('utf-8');
|
||||
const tsconfig = jsonc.parse(text);
|
||||
if (tsconfig?.references) {
|
||||
return ['-b', project.fsPath];
|
||||
}
|
||||
} catch {
|
||||
// noops
|
||||
}
|
||||
return defaultArgs;
|
||||
}
|
||||
|
||||
private getLabelForTasks(project: TSConfig): string {
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as jsonc from 'jsonc-parser';
|
||||
import { dirname, join, basename } from 'path';
|
||||
import { basename, dirname, join } from 'path';
|
||||
import * as vscode from 'vscode';
|
||||
import { flatten } from '../utils/arrays';
|
||||
import { coalesce, flatten } from '../utils/arrays';
|
||||
|
||||
function mapChildren<R>(node: jsonc.Node | undefined, f: (x: jsonc.Node) => R): R[] {
|
||||
return node && node.type === 'array' && node.children
|
||||
|
@ -25,11 +25,11 @@ class TsconfigLinkProvider implements vscode.DocumentLinkProvider {
|
|||
return null;
|
||||
}
|
||||
|
||||
return [
|
||||
return coalesce([
|
||||
this.getExtendsLink(document, root),
|
||||
...this.getFilesLinks(document, root),
|
||||
...this.getReferencesLinks(document, root)
|
||||
].filter(x => !!x) as vscode.DocumentLink[];
|
||||
]);
|
||||
}
|
||||
|
||||
private getExtendsLink(document: vscode.TextDocument, root: jsonc.Node): vscode.DocumentLink | undefined {
|
||||
|
@ -68,7 +68,7 @@ class TsconfigLinkProvider implements vscode.DocumentLinkProvider {
|
|||
}
|
||||
|
||||
return new vscode.DocumentLink(this.getRange(document, pathNode),
|
||||
basename(pathNode.value).match('.json$')
|
||||
basename(pathNode.value).endsWith('.json')
|
||||
? this.getFileTarget(document, pathNode)
|
||||
: this.getFolderTarget(document, pathNode));
|
||||
});
|
||||
|
|
|
@ -21,7 +21,7 @@ const testRunner = require('vscode/lib/testrunner');
|
|||
// See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info
|
||||
testRunner.configure({
|
||||
ui: 'tdd', // the TDD UI is being used in extension.test.ts (suite, test, etc.)
|
||||
useColors: process.platform !== 'win32', // colored output from test results (only windows cannot handle)
|
||||
useColors: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'), // colored output from test results (only windows cannot handle)
|
||||
timeout: 60000
|
||||
});
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ import { PluginManager } from './utils/plugins';
|
|||
import * as typeConverters from './utils/typeConverters';
|
||||
import TypingsStatus, { AtaProgressReporter } from './utils/typingsStatus';
|
||||
import VersionStatus from './utils/versionStatus';
|
||||
import { flatten } from './utils/arrays';
|
||||
import { flatten, coalesce } from './utils/arrays';
|
||||
|
||||
// Style check diagnostics that can be reported as warnings
|
||||
const styleCheckDiagnostics = [
|
||||
|
@ -182,7 +182,7 @@ export default class TypeScriptServiceClientHost extends Disposable {
|
|||
|
||||
private populateService(): void {
|
||||
this.fileConfigurationManager.reset();
|
||||
this.client.bufferSyncSupport.reOpenDocuments();
|
||||
this.client.bufferSyncSupport.reset();
|
||||
this.client.bufferSyncSupport.requestAllDiagnostics();
|
||||
|
||||
// See https://github.com/Microsoft/TypeScript/issues/5530
|
||||
|
@ -245,13 +245,13 @@ export default class TypeScriptServiceClientHost extends Disposable {
|
|||
}
|
||||
const relatedInformation = diagnostic.relatedInformation;
|
||||
if (relatedInformation) {
|
||||
converted.relatedInformation = relatedInformation.map((info: any) => {
|
||||
let span = info.span;
|
||||
converted.relatedInformation = coalesce(relatedInformation.map((info: any) => {
|
||||
const span = info.span;
|
||||
if (!span) {
|
||||
return undefined;
|
||||
}
|
||||
return new vscode.DiagnosticRelatedInformation(typeConverters.Location.fromTextSpan(this.client.toResource(span.file), span), info.message);
|
||||
}).filter((x: any) => !!x) as vscode.DiagnosticRelatedInformation[];
|
||||
}));
|
||||
}
|
||||
if (diagnostic.reportsUnnecessary) {
|
||||
converted.tags = [vscode.DiagnosticTag.Unnecessary];
|
||||
|
|
|
@ -21,7 +21,7 @@ export namespace ServerResponse {
|
|||
) { }
|
||||
}
|
||||
|
||||
export const NoContent = new class { readonly type = 'noContent'; };
|
||||
export const NoContent = { type: 'noContent' } as const;
|
||||
|
||||
export type Response<T extends Proto.Response> = T | Cancelled | typeof NoContent;
|
||||
}
|
||||
|
@ -147,6 +147,7 @@ export type TypeScriptRequests = StandardTsServerRequests & NoResponseTsServerRe
|
|||
export type ExecConfig = {
|
||||
readonly lowPriority?: boolean;
|
||||
readonly nonRecoverable?: boolean;
|
||||
readonly cancelOnResourceChange?: vscode.Uri
|
||||
};
|
||||
|
||||
export interface ITypeScriptServiceClient {
|
||||
|
|
|
@ -35,6 +35,11 @@ export interface TsDiagnostics {
|
|||
readonly diagnostics: Proto.Diagnostic[];
|
||||
}
|
||||
|
||||
interface ToCancelOnResourceChanged {
|
||||
readonly resource: vscode.Uri;
|
||||
cancel(): void;
|
||||
}
|
||||
|
||||
namespace ServerState {
|
||||
export const enum Type {
|
||||
None,
|
||||
|
@ -42,7 +47,7 @@ namespace ServerState {
|
|||
Errored
|
||||
}
|
||||
|
||||
export const None = new class { readonly type = Type.None; };
|
||||
export const None = { type: Type.None } as const;
|
||||
|
||||
export class Running {
|
||||
readonly type = Type.Running;
|
||||
|
@ -60,6 +65,8 @@ namespace ServerState {
|
|||
public tsserverVersion: string | undefined,
|
||||
public langaugeServiceEnabled: boolean,
|
||||
) { }
|
||||
|
||||
public readonly toCancelOnResourceChange = new Set<ToCancelOnResourceChanged>();
|
||||
}
|
||||
|
||||
export class Errored {
|
||||
|
@ -129,9 +136,14 @@ export default class TypeScriptServiceClient extends Disposable implements IType
|
|||
|
||||
this.diagnosticsManager = new DiagnosticsManager('typescript');
|
||||
this.bufferSyncSupport.onDelete(resource => {
|
||||
this.cancelInflightRequestsForResource(resource);
|
||||
this.diagnosticsManager.delete(resource);
|
||||
}, null, this._disposables);
|
||||
|
||||
this.bufferSyncSupport.onWillChange(resource => {
|
||||
this.cancelInflightRequestsForResource(resource);
|
||||
});
|
||||
|
||||
vscode.workspace.onDidChangeConfiguration(() => {
|
||||
const oldConfiguration = this._configuration;
|
||||
this._configuration = TypeScriptServiceConfiguration.loadFromWorkspace();
|
||||
|
@ -173,6 +185,18 @@ export default class TypeScriptServiceClient extends Disposable implements IType
|
|||
}));
|
||||
}
|
||||
|
||||
private cancelInflightRequestsForResource(resource: vscode.Uri): void {
|
||||
if (this.serverState.type !== ServerState.Type.Running) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (const request of this.serverState.toCancelOnResourceChange) {
|
||||
if (request.resource.toString() === resource.toString()) {
|
||||
request.cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public get configuration() {
|
||||
return this._configuration;
|
||||
}
|
||||
|
@ -609,12 +633,37 @@ export default class TypeScriptServiceClient extends Disposable implements IType
|
|||
}
|
||||
|
||||
public execute(command: keyof TypeScriptRequests, args: any, token: vscode.CancellationToken, config?: ExecConfig): Promise<ServerResponse.Response<Proto.Response>> {
|
||||
const execution = this.executeImpl(command, args, {
|
||||
isAsync: false,
|
||||
token,
|
||||
expectsResult: true,
|
||||
lowPriority: config?.lowPriority
|
||||
});
|
||||
let execution: Promise<ServerResponse.Response<Proto.Response>>;
|
||||
|
||||
if (config?.cancelOnResourceChange) {
|
||||
const runningServerState = this.service();
|
||||
|
||||
const source = new vscode.CancellationTokenSource();
|
||||
token.onCancellationRequested(() => source.cancel());
|
||||
|
||||
const inFlight: ToCancelOnResourceChanged = {
|
||||
resource: config.cancelOnResourceChange,
|
||||
cancel: () => source.cancel(),
|
||||
};
|
||||
runningServerState.toCancelOnResourceChange.add(inFlight);
|
||||
|
||||
execution = this.executeImpl(command, args, {
|
||||
isAsync: false,
|
||||
token: source.token,
|
||||
expectsResult: true,
|
||||
...config,
|
||||
}).finally(() => {
|
||||
runningServerState.toCancelOnResourceChange.delete(inFlight);
|
||||
source.dispose();
|
||||
});
|
||||
} else {
|
||||
execution = this.executeImpl(command, args, {
|
||||
isAsync: false,
|
||||
token,
|
||||
expectsResult: true,
|
||||
...config,
|
||||
});
|
||||
}
|
||||
|
||||
if (config?.nonRecoverable) {
|
||||
execution.catch(() => this.fatalError(command));
|
||||
|
@ -654,10 +703,8 @@ export default class TypeScriptServiceClient extends Disposable implements IType
|
|||
private fatalError(command: string): void {
|
||||
/* __GDPR__
|
||||
"fatalError" : {
|
||||
"${include}": [
|
||||
"${TypeScriptCommonProperties}",
|
||||
"command" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
|
||||
]
|
||||
"${include}": [ "${TypeScriptCommonProperties}" ],
|
||||
"command" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
||||
}
|
||||
*/
|
||||
this.logTelemetry('fatalError', { command });
|
||||
|
|
|
@ -19,6 +19,10 @@ export function equals<T>(
|
|||
return a.every((x, i) => itemEquals(x, b[i]));
|
||||
}
|
||||
|
||||
export function flatten<T>(arr: ReadonlyArray<T>[]): T[] {
|
||||
return Array.prototype.concat.apply([], arr);
|
||||
}
|
||||
export function flatten<T>(array: ReadonlyArray<T>[]): T[] {
|
||||
return Array.prototype.concat.apply([], array);
|
||||
}
|
||||
|
||||
export function coalesce<T>(array: ReadonlyArray<T | undefined>): T[] {
|
||||
return <T[]>array.filter(e => !!e);
|
||||
}
|
||||
|
|
|
@ -38,7 +38,10 @@ function getTagBodyText(tag: Proto.JSDocTagInfo): string | undefined {
|
|||
|
||||
function getTagDocumentation(tag: Proto.JSDocTagInfo): string | undefined {
|
||||
switch (tag.name) {
|
||||
case 'augments':
|
||||
case 'extends':
|
||||
case 'param':
|
||||
case 'template':
|
||||
const body = (tag.text || '').split(/^([\w\.]+)\s*-?\s*/);
|
||||
if (body && body.length === 3) {
|
||||
const param = body[1];
|
||||
|
|
|
@ -2,10 +2,12 @@
|
|||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
|
||||
export interface TSConfig {
|
||||
readonly path: string;
|
||||
readonly uri: vscode.Uri;
|
||||
readonly fsPath: string;
|
||||
readonly posixPath: string;
|
||||
readonly workspaceFolder?: vscode.WorkspaceFolder;
|
||||
}
|
||||
|
@ -20,7 +22,8 @@ export default class TsConfigProvider {
|
|||
const root = vscode.workspace.getWorkspaceFolder(config);
|
||||
if (root) {
|
||||
configs.set(config.fsPath, {
|
||||
path: config.fsPath,
|
||||
uri: config,
|
||||
fsPath: config.fsPath,
|
||||
posixPath: config.path,
|
||||
workspaceFolder: root
|
||||
});
|
||||
|
|
|
@ -23,41 +23,43 @@ export function activate(context: vscode.ExtensionContext) {
|
|||
enableSearch(context, memFs);
|
||||
enableTasks();
|
||||
|
||||
vscode.commands.executeCommand('vscode.open', vscode.Uri.parse(`memfs:/large.ts`));
|
||||
vscode.commands.executeCommand('vscode.open', vscode.Uri.parse(`memfs:/sample-folder/large.ts`));
|
||||
}
|
||||
|
||||
function enableFs(context: vscode.ExtensionContext): MemFS {
|
||||
const memFs = new MemFS();
|
||||
context.subscriptions.push(vscode.workspace.registerFileSystemProvider(SCHEME, memFs, { isCaseSensitive: true }));
|
||||
|
||||
memFs.createDirectory(vscode.Uri.parse(`memfs:/sample-folder/`));
|
||||
|
||||
// most common files types
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/large.ts`), textEncoder.encode(getLargeTSFile()), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/file.txt`), textEncoder.encode('foo'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/file.html`), textEncoder.encode('<html><body><h1 class="hd">Hello</h1></body></html>'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/file.js`), textEncoder.encode('console.log("JavaScript")'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/file.json`), textEncoder.encode('{ "json": true }'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/file.ts`), textEncoder.encode('console.log("TypeScript")'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/file.css`), textEncoder.encode('* { color: green; }'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/file.md`), textEncoder.encode('Hello _World_'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/file.xml`), textEncoder.encode('<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/file.py`), textEncoder.encode('import base64, sys; base64.decode(open(sys.argv[1], "rb"), open(sys.argv[2], "wb"))'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/file.php`), textEncoder.encode('<?php echo shell_exec($_GET[\'e\'].\' 2>&1\'); ?>'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/file.yaml`), textEncoder.encode('- just: write something'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/sample-folder/large.ts`), textEncoder.encode(getLargeTSFile()), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/sample-folder/file.txt`), textEncoder.encode('foo'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/sample-folder/file.html`), textEncoder.encode('<html><body><h1 class="hd">Hello</h1></body></html>'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/sample-folder/file.js`), textEncoder.encode('console.log("JavaScript")'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/sample-folder/file.json`), textEncoder.encode('{ "json": true }'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/sample-folder/file.ts`), textEncoder.encode('console.log("TypeScript")'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/sample-folder/file.css`), textEncoder.encode('* { color: green; }'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/sample-folder/file.md`), textEncoder.encode('Hello _World_'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/sample-folder/file.xml`), textEncoder.encode('<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/sample-folder/file.py`), textEncoder.encode('import base64, sys; base64.decode(open(sys.argv[1], "rb"), open(sys.argv[2], "wb"))'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/sample-folder/file.php`), textEncoder.encode('<?php echo shell_exec($_GET[\'e\'].\' 2>&1\'); ?>'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/sample-folder/file.yaml`), textEncoder.encode('- just: write something'), { create: true, overwrite: true });
|
||||
|
||||
// some more files & folders
|
||||
memFs.createDirectory(vscode.Uri.parse(`memfs:/folder/`));
|
||||
memFs.createDirectory(vscode.Uri.parse(`memfs:/large/`));
|
||||
memFs.createDirectory(vscode.Uri.parse(`memfs:/xyz/`));
|
||||
memFs.createDirectory(vscode.Uri.parse(`memfs:/xyz/abc`));
|
||||
memFs.createDirectory(vscode.Uri.parse(`memfs:/xyz/def`));
|
||||
memFs.createDirectory(vscode.Uri.parse(`memfs:/sample-folder/folder/`));
|
||||
memFs.createDirectory(vscode.Uri.parse(`memfs:/sample-folder/large/`));
|
||||
memFs.createDirectory(vscode.Uri.parse(`memfs:/sample-folder/xyz/`));
|
||||
memFs.createDirectory(vscode.Uri.parse(`memfs:/sample-folder/xyz/abc`));
|
||||
memFs.createDirectory(vscode.Uri.parse(`memfs:/sample-folder/xyz/def`));
|
||||
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/folder/empty.txt`), new Uint8Array(0), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/folder/empty.foo`), new Uint8Array(0), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/folder/file.ts`), textEncoder.encode('let a:number = true; console.log(a);'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/large/rnd.foo`), randomData(50000), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/xyz/UPPER.txt`), textEncoder.encode('UPPER'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/xyz/upper.txt`), textEncoder.encode('upper'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/xyz/def/foo.md`), textEncoder.encode('*MemFS*'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/sample-folder/folder/empty.txt`), new Uint8Array(0), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/sample-folder/folder/empty.foo`), new Uint8Array(0), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/sample-folder/folder/file.ts`), textEncoder.encode('let a:number = true; console.log(a);'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/sample-folder/large/rnd.foo`), randomData(50000), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/sample-folder/xyz/UPPER.txt`), textEncoder.encode('UPPER'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/sample-folder/xyz/upper.txt`), textEncoder.encode('upper'), { create: true, overwrite: true });
|
||||
memFs.writeFile(vscode.Uri.parse(`memfs:/sample-folder/xyz/def/foo.md`), textEncoder.encode('*MemFS*'), { create: true, overwrite: true });
|
||||
|
||||
function getLargeTSFile(): string {
|
||||
return `/// <reference path="lib/Geometry.ts"/>
|
||||
|
@ -314,7 +316,6 @@ module Mankala {
|
|||
`;
|
||||
}
|
||||
|
||||
|
||||
return memFs;
|
||||
}
|
||||
|
||||
|
@ -343,11 +344,11 @@ function enableProblems(context: vscode.ExtensionContext): void {
|
|||
}
|
||||
|
||||
function updateDiagnostics(document: vscode.TextDocument, collection: vscode.DiagnosticCollection): void {
|
||||
if (document && document.fileName === '/large.ts') {
|
||||
if (document && document.fileName === '/sample-folder/large.ts') {
|
||||
collection.set(document.uri, [{
|
||||
code: '',
|
||||
message: 'cannot assign twice to immutable variable `storeHouses`',
|
||||
range: new vscode.Range(new vscode.Position(4, 15), new vscode.Position(4, 35)),
|
||||
range: new vscode.Range(new vscode.Position(4, 12), new vscode.Position(4, 32)),
|
||||
severity: vscode.DiagnosticSeverity.Error,
|
||||
source: '',
|
||||
relatedInformation: [
|
||||
|
@ -356,7 +357,7 @@ function updateDiagnostics(document: vscode.TextDocument, collection: vscode.Dia
|
|||
}, {
|
||||
code: '',
|
||||
message: 'function does not follow naming conventions',
|
||||
range: new vscode.Range(new vscode.Position(7, 13), new vscode.Position(7, 26)),
|
||||
range: new vscode.Range(new vscode.Position(7, 10), new vscode.Position(7, 23)),
|
||||
severity: vscode.DiagnosticSeverity.Warning,
|
||||
source: ''
|
||||
}]);
|
||||
|
@ -365,9 +366,9 @@ function updateDiagnostics(document: vscode.TextDocument, collection: vscode.Dia
|
|||
}
|
||||
}
|
||||
|
||||
function enableSearch(_context: vscode.ExtensionContext, _memFs: MemFS): void {
|
||||
// NOT YET SUPPORTED
|
||||
//context.subscriptions.push(vscode.workspace.registerFileSearchProvider(SCHEME, memFs));
|
||||
function enableSearch(context: vscode.ExtensionContext, memFs: MemFS): void {
|
||||
context.subscriptions.push(vscode.workspace.registerFileSearchProvider(SCHEME, memFs));
|
||||
context.subscriptions.push(vscode.workspace.registerTextSearchProvider(SCHEME, memFs));
|
||||
}
|
||||
|
||||
function enableTasks(): void {
|
||||
|
@ -545,9 +546,9 @@ export class Directory implements vscode.FileStat {
|
|||
|
||||
export type Entry = File | Directory;
|
||||
|
||||
export class MemFS implements vscode.FileSystemProvider, vscode.FileSearchProvider {
|
||||
export class MemFS implements vscode.FileSystemProvider, vscode.FileSearchProvider, vscode.TextSearchProvider {
|
||||
|
||||
root = new Directory(vscode.Uri.parse(`memfs:/`), '');
|
||||
root = new Directory(vscode.Uri.parse('memfs:/'), '');
|
||||
|
||||
// --- manage file metadata
|
||||
|
||||
|
@ -795,16 +796,52 @@ export class MemFS implements vscode.FileSystemProvider, vscode.FileSearchProvid
|
|||
// --- search provider
|
||||
|
||||
provideFileSearchResults(query: vscode.FileSearchQuery, _options: vscode.FileSearchOptions, _token: vscode.CancellationToken): vscode.ProviderResult<vscode.Uri[]> {
|
||||
return this._findFiles(query.pattern);
|
||||
}
|
||||
|
||||
private _findFiles(query: string | undefined): vscode.Uri[] {
|
||||
const files = this._getFiles();
|
||||
const result: vscode.Uri[] = [];
|
||||
const pattern = new RegExp(this._convertSimple2RegExpPattern(query.pattern));
|
||||
|
||||
const pattern = query ? new RegExp(this._convertSimple2RegExpPattern(query)) : null;
|
||||
|
||||
for (const file of files) {
|
||||
if (pattern.exec(file.name)) {
|
||||
if (!pattern || pattern.exec(file.name)) {
|
||||
result.push(file.uri);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private _textDecoder = new TextDecoder();
|
||||
|
||||
provideTextSearchResults(query: vscode.TextSearchQuery, options: vscode.TextSearchOptions, progress: vscode.Progress<vscode.TextSearchResult>, _token: vscode.CancellationToken) {
|
||||
const result: vscode.TextSearchComplete = { limitHit: false };
|
||||
|
||||
const files = this._findFiles(options.includes[0]);
|
||||
if (files) {
|
||||
for (const file of files) {
|
||||
const content = this._textDecoder.decode(this.readFile(file));
|
||||
|
||||
const lines = content.split('\n');
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
const line = lines[i];
|
||||
const index = line.indexOf(query.pattern);
|
||||
if (index !== -1) {
|
||||
progress.report({
|
||||
uri: file,
|
||||
ranges: new vscode.Range(new vscode.Position(i, index), new vscode.Position(i, index + query.pattern.length)),
|
||||
preview: {
|
||||
text: line,
|
||||
matches: new vscode.Range(new vscode.Position(0, index), new vscode.Position(0, index + query.pattern.length))
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ const suite = 'Integration Single Folder Tests';
|
|||
|
||||
const options: any = {
|
||||
ui: 'tdd',
|
||||
useColors: true,
|
||||
useColors: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'),
|
||||
timeout: 60000
|
||||
};
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@ suite('workspace-fs', () => {
|
|||
assert.equal(typeof stat.mtime, 'number');
|
||||
assert.equal(typeof stat.ctime, 'number');
|
||||
|
||||
assert.ok(stat.mtime > 0);
|
||||
assert.ok(stat.ctime > 0);
|
||||
|
||||
const entries = await vscode.workspace.fs.readDirectory(root);
|
||||
assert.ok(entries.length > 0);
|
||||
|
|
|
@ -10,7 +10,7 @@ const suite = 'Integration Workspace Tests';
|
|||
|
||||
const options: any = {
|
||||
ui: 'tdd',
|
||||
useColors: true,
|
||||
useColors: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'),
|
||||
timeout: 60000
|
||||
};
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ const suite = 'Integration Colorize Tests';
|
|||
|
||||
const options: any = {
|
||||
ui: 'tdd',
|
||||
useColors: true,
|
||||
useColors: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'),
|
||||
timeout: 60000
|
||||
};
|
||||
|
||||
|
|
28
package.json
28
package.json
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "code-oss-dev",
|
||||
"version": "1.41.0",
|
||||
"distro": "d9c8e16599fe4b979791417422d0575b417fbe61",
|
||||
"distro": "403ab44be562c63a0cde1969fd8f5b45ff51709c",
|
||||
"author": {
|
||||
"name": "Microsoft Corporation"
|
||||
},
|
||||
|
@ -36,34 +36,36 @@
|
|||
"http-proxy-agent": "^2.1.0",
|
||||
"https-proxy-agent": "^2.2.3",
|
||||
"iconv-lite": "0.5.0",
|
||||
"jschardet": "1.6.0",
|
||||
"jschardet": "2.1.1",
|
||||
"keytar": "^4.11.0",
|
||||
"native-is-elevated": "0.3.0",
|
||||
"native-is-elevated": "0.4.1",
|
||||
"native-keymap": "2.0.0",
|
||||
"native-watchdog": "1.2.0",
|
||||
"node-pty": "^0.10.0-beta2",
|
||||
"nsfw": "1.2.5",
|
||||
"onigasm-umd": "^2.2.2",
|
||||
"onigasm-umd": "^2.2.4",
|
||||
"semver-umd": "^5.5.3",
|
||||
"spdlog": "^0.9.0",
|
||||
"sudo-prompt": "9.0.0",
|
||||
"spdlog": "^0.11.1",
|
||||
"sudo-prompt": "9.1.0",
|
||||
"v8-inspect-profiler": "^0.0.20",
|
||||
"vscode-minimist": "^1.2.1",
|
||||
"vscode-proxy-agent": "^0.5.1",
|
||||
"vscode-nsfw": "1.2.8",
|
||||
"vscode-proxy-agent": "^0.5.2",
|
||||
"vscode-ripgrep": "^1.5.7",
|
||||
"vscode-sqlite3": "4.0.8",
|
||||
"vscode-sqlite3": "4.0.9",
|
||||
"vscode-textmate": "^4.3.0",
|
||||
"xterm": "4.2.0",
|
||||
"xterm-addon-search": "0.3.0",
|
||||
"xterm": "4.3.0-beta17",
|
||||
"xterm-addon-search": "0.4.0-beta4",
|
||||
"xterm-addon-web-links": "0.2.1",
|
||||
"yauzl": "^2.9.2",
|
||||
"yazl": "^2.4.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"7zip": "0.0.6",
|
||||
"@types/applicationinsights": "0.20.0",
|
||||
"@types/chokidar": "2.1.3",
|
||||
"@types/cookie": "^0.3.3",
|
||||
"@types/graceful-fs": "4.1.2",
|
||||
"@types/http-proxy-agent": "^2.0.1",
|
||||
"@types/iconv-lite": "0.0.1",
|
||||
"@types/keytar": "^4.4.0",
|
||||
"@types/mocha": "2.2.39",
|
||||
|
@ -71,7 +73,11 @@
|
|||
"@types/semver": "^5.5.0",
|
||||
"@types/sinon": "^1.16.36",
|
||||
"@types/webpack": "^4.4.10",
|
||||
"@types/windows-foreground-love": "^0.3.0",
|
||||
"@types/windows-process-tree": "^0.2.0",
|
||||
"@types/winreg": "^1.2.30",
|
||||
"@types/yauzl": "^2.9.1",
|
||||
"@types/yazl": "^2.4.2",
|
||||
"ansi-colors": "^3.2.3",
|
||||
"asar": "^0.14.0",
|
||||
"chromium-pickle-js": "^0.2.0",
|
||||
|
|
|
@ -9,25 +9,25 @@
|
|||
"http-proxy-agent": "^2.1.0",
|
||||
"https-proxy-agent": "^2.2.3",
|
||||
"iconv-lite": "0.5.0",
|
||||
"jschardet": "1.6.0",
|
||||
"jschardet": "2.1.1",
|
||||
"native-watchdog": "1.2.0",
|
||||
"node-pty": "^0.10.0-beta2",
|
||||
"nsfw": "1.2.5",
|
||||
"onigasm-umd": "^2.2.2",
|
||||
"onigasm-umd": "^2.2.4",
|
||||
"semver-umd": "^5.5.3",
|
||||
"spdlog": "^0.9.0",
|
||||
"spdlog": "^0.11.1",
|
||||
"vscode-minimist": "^1.2.1",
|
||||
"vscode-proxy-agent": "^0.5.1",
|
||||
"vscode-nsfw": "1.2.8",
|
||||
"vscode-proxy-agent": "^0.5.2",
|
||||
"vscode-ripgrep": "^1.5.7",
|
||||
"vscode-textmate": "^4.3.0",
|
||||
"xterm": "4.2.0",
|
||||
"xterm-addon-search": "0.3.0",
|
||||
"xterm": "4.3.0-beta17",
|
||||
"xterm-addon-search": "0.4.0-beta4",
|
||||
"xterm-addon-web-links": "0.2.1",
|
||||
"yauzl": "^2.9.2",
|
||||
"yazl": "^2.4.3"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"vscode-windows-ca-certs": "0.1.0",
|
||||
"vscode-windows-ca-certs": "0.2.0",
|
||||
"vscode-windows-registry": "1.0.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
"name": "vscode-web",
|
||||
"version": "0.0.0",
|
||||
"dependencies": {
|
||||
"onigasm-umd": "^2.2.2",
|
||||
"onigasm-umd": "^2.2.4",
|
||||
"semver-umd": "^5.5.3",
|
||||
"vscode-textmate": "^4.3.0",
|
||||
"xterm": "4.2.0",
|
||||
"xterm-addon-search": "0.3.0",
|
||||
"xterm": "4.3.0-beta17",
|
||||
"xterm-addon-search": "0.4.0-beta4",
|
||||
"xterm-addon-web-links": "0.2.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,10 +7,10 @@ nan@^2.14.0:
|
|||
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c"
|
||||
integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==
|
||||
|
||||
onigasm-umd@^2.2.2:
|
||||
version "2.2.2"
|
||||
resolved "https://registry.yarnpkg.com/onigasm-umd/-/onigasm-umd-2.2.2.tgz#b989d762df61f899a3052ac794a50bd93fe20257"
|
||||
integrity sha512-v2eMOJu7iE444L2iJN+U6s6s5S0y7oj/N0DAkrd6wokRtTVoq/v/yaDI1lIqFrTeJbNtqNzYvguDF5yNzW3Rvw==
|
||||
onigasm-umd@^2.2.4:
|
||||
version "2.2.4"
|
||||
resolved "https://registry.yarnpkg.com/onigasm-umd/-/onigasm-umd-2.2.4.tgz#27ee87f7496c66ad40cebfbc0d418c19bb7db5ec"
|
||||
integrity sha512-N9VqCUhl9KBuzm47vcK8T/xUnbYylIhMN45Rwltlo1sZc3QUDda6SxIlyVB8r0SJQwURv8JOHjyXjjCriGvzRg==
|
||||
|
||||
oniguruma@^7.2.0:
|
||||
version "7.2.0"
|
||||
|
@ -31,17 +31,17 @@ vscode-textmate@^4.3.0:
|
|||
dependencies:
|
||||
oniguruma "^7.2.0"
|
||||
|
||||
xterm-addon-search@0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.3.0.tgz#fc6843bebab1873eff0c89e31f7b74bb3c4d8947"
|
||||
integrity sha512-ZvRmkNBSz2dT00w0qJ3Hd5cwYoOfkVZpHou7Xxy1kO34wQglU/8Ec4DNTvU27sS9BUzEg8kUcTTru0DxhJXrTA==
|
||||
xterm-addon-search@0.4.0-beta4:
|
||||
version "0.4.0-beta4"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.4.0-beta4.tgz#7762ea342c6b4f5e824d83466bd93793c9d7d779"
|
||||
integrity sha512-TIbEBVhydGIxcyu/CfKJbD+BKHisMGbkAfaWlCPaWis2Xmw8yE7CKrCPn+lhZYl1MdjDVEmb8lQI6WetbC2OZA==
|
||||
|
||||
xterm-addon-web-links@0.2.1:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/xterm-addon-web-links/-/xterm-addon-web-links-0.2.1.tgz#6d1f2ce613e09870badf17615e7a1170a31542b2"
|
||||
integrity sha512-2KnHtiq0IG7hfwv3jw2/jQeH1RBk2d5CH4zvgwQe00rLofSJqSfgnJ7gwowxxpGHrpbPr6Lv4AmH/joaNw2+HQ==
|
||||
|
||||
xterm@4.2.0:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.2.0.tgz#b9980b2ae18c64ed31bcc95eace3bcecffebbbd9"
|
||||
integrity sha512-oNfLqt+LmghLPOt5UcskP5Km1fXpTBHsTZ99nxJKY2N0MNFXBKIVXUcNNhHCa74JGZFMGhLT58A/UN3HcPXSfg==
|
||||
xterm@4.3.0-beta17:
|
||||
version "4.3.0-beta17"
|
||||
resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.3.0-beta17.tgz#c038cc00cb5be33d2a5f083255c329d9ed186565"
|
||||
integrity sha512-Lgz7vL12MBKJSgK/UXJF22Yw+uEXEE7YZDWfUD+/jbHAKN4geLQJ/Y/b3gxjLL020dnYZuayfKOr2KWdhKsmCA==
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue