mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Merge branch 'master' into spdlog
This commit is contained in:
@@ -7,6 +7,12 @@
|
||||
action: 'close',
|
||||
comment: "Please ask your question on [StackOverflow](https://aka.ms/vscodestackoverflow). We have a great community over [there](https://aka.ms/vscodestackoverflow). They have already answered thousands of questions and are happy to answer yours as well. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nHappy Coding!"
|
||||
},
|
||||
{
|
||||
type: 'label',
|
||||
name: '*dev-question',
|
||||
action: 'close',
|
||||
comment: "We have a great developer community [over on slack](https://aka.ms/vscode-dev-community) where extension authors help each other. This is a great place for you to ask questions and find support.\n\nHappy Coding!"
|
||||
},
|
||||
{
|
||||
type: 'label',
|
||||
name: '*extension-candidate',
|
||||
|
||||
@@ -45,8 +45,8 @@ const nodeModules = ['electron', 'original-fs']
|
||||
// Build
|
||||
|
||||
const builtInExtensions = [
|
||||
{ name: 'ms-vscode.node-debug', version: '1.19.5' },
|
||||
{ name: 'ms-vscode.node-debug2', version: '1.19.0' }
|
||||
{ name: 'ms-vscode.node-debug', version: '1.19.6' },
|
||||
{ name: 'ms-vscode.node-debug2', version: '1.19.1' }
|
||||
];
|
||||
|
||||
const excludedExtensions = [
|
||||
@@ -138,7 +138,6 @@ const config = {
|
||||
role: 'Editor',
|
||||
ostypes: ["TEXT", "utxt", "TUTX", "****"],
|
||||
extensions: ["ascx", "asp", "aspx", "bash", "bash_login", "bash_logout", "bash_profile", "bashrc", "bat", "bowerrc", "c", "cc", "clj", "cljs", "cljx", "clojure", "cmd", "code-workspace", "coffee", "config", "cpp", "cs", "cshtml", "csproj", "css", "csx", "ctp", "cxx", "dockerfile", "dot", "dtd", "editorconfig", "edn", "eyaml", "eyml", "fs", "fsi", "fsscript", "fsx", "gemspec", "gitattributes", "gitconfig", "gitignore", "go", "h", "handlebars", "hbs", "hh", "hpp", "htm", "html", "hxx", "ini", "jade", "jav", "java", "js", "jscsrc", "jshintrc", "jshtm", "json", "jsp", "less", "lua", "m", "makefile", "markdown", "md", "mdoc", "mdown", "mdtext", "mdtxt", "mdwn", "mkd", "mkdn", "ml", "mli", "php", "phtml", "pl", "pl6", "pm", "pm6", "pod", "pp", "profile", "properties", "ps1", "psd1", "psgi", "psm1", "py", "r", "rb", "rhistory", "rprofile", "rs", "rt", "scss", "sh", "shtml", "sql", "svg", "svgz", "t", "ts", "txt", "vb", "wxi", "wxl", "wxs", "xaml", "xcodeproj", "xcworkspace", "xml", "yaml", "yml", "zlogin", "zlogout", "zprofile", "zsh", "zshenv", "zshrc"],
|
||||
utis: ['public.source-code'],
|
||||
iconFile: 'resources/darwin/code_file.icns'
|
||||
}],
|
||||
darwinBundleURLTypes: [{
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
"language": "bat",
|
||||
"scopeName": "source.batchfile",
|
||||
"path": "./syntaxes/batchfile.tmLanguage.json"
|
||||
}],
|
||||
"snippets": [{
|
||||
"language": "bat",
|
||||
"path": "./snippets/batchfile.snippets.json"
|
||||
}]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"Region Start": {
|
||||
"prefix": "#region",
|
||||
"body": [
|
||||
"::#region"
|
||||
],
|
||||
"description": "Folding Region Start"
|
||||
},
|
||||
"Region End": {
|
||||
"prefix": "#endregion",
|
||||
"body": [
|
||||
"::#endregion"
|
||||
],
|
||||
"description": "Folding Region End"
|
||||
}
|
||||
}
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
import * as path from 'path';
|
||||
|
||||
import { languages, window, commands, ExtensionContext, TextDocument, ColorInformation, ColorPresentation, Color } from 'vscode';
|
||||
import { LanguageClient, LanguageClientOptions, ServerOptions, TransportKind, TextEdit } from 'vscode-languageclient';
|
||||
import { languages, window, commands, ExtensionContext, TextDocument, ColorInformation, ColorPresentation, Color, Range, Position, CompletionItem, CompletionItemKind, TextEdit, SnippetString } from 'vscode';
|
||||
import { LanguageClient, LanguageClientOptions, ServerOptions, TransportKind } from 'vscode-languageclient';
|
||||
|
||||
import { ConfigurationFeature } from 'vscode-languageclient/lib/configuration.proposed';
|
||||
import { DocumentColorRequest, DocumentColorParams, ColorPresentationRequest, ColorPresentationParams } from 'vscode-languageserver-protocol/lib/protocol.colorProvider.proposed';
|
||||
@@ -104,6 +104,31 @@ export function activate(context: ExtensionContext) {
|
||||
indentationRules: indentationRules
|
||||
});
|
||||
|
||||
const regionCompletionRegExpr = /^(\s*)(\/(\*\s*(#\w*)?)?)?/;
|
||||
languages.registerCompletionItemProvider(documentSelector, {
|
||||
provideCompletionItems(doc, pos) {
|
||||
let lineUntilPos = doc.getText(new Range(new Position(pos.line, 0), pos));
|
||||
let match = lineUntilPos.match(regionCompletionRegExpr);
|
||||
if (match) {
|
||||
let range = new Range(new Position(pos.line, match[1].length), pos);
|
||||
let beginProposal = new CompletionItem('#region', CompletionItemKind.Snippet);
|
||||
beginProposal.range = range; TextEdit.replace(range, '/* #region */');
|
||||
beginProposal.insertText = new SnippetString('/* #region $1*/');
|
||||
beginProposal.documentation = localize('folding.start', 'Folding Region Start');
|
||||
beginProposal.filterText = match[2];
|
||||
beginProposal.sortText = 'za';
|
||||
let endProposal = new CompletionItem('#endregion', CompletionItemKind.Snippet);
|
||||
endProposal.range = range;
|
||||
endProposal.insertText = '/* #endregion */';
|
||||
endProposal.documentation = localize('folding.end', 'Folding Region End');
|
||||
endProposal.sortText = 'zb';
|
||||
endProposal.filterText = match[2];
|
||||
return [beginProposal, endProposal];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
commands.registerCommand('_css.applyCodeAction', applyCodeAction);
|
||||
|
||||
function applyCodeAction(uri: string, documentVersion: number, edits: TextEdit[]) {
|
||||
|
||||
@@ -298,7 +298,7 @@
|
||||
"@emmetio/html-matcher": "^0.3.1",
|
||||
"@emmetio/css-parser": "ramya-rao-a/css-parser#vscode",
|
||||
"@emmetio/math-expression": "^0.1.1",
|
||||
"vscode-emmet-helper": "^1.1.18",
|
||||
"vscode-emmet-helper": "^1.1.19",
|
||||
"vscode-languageserver-types": "^3.0.3",
|
||||
"image-size": "^0.5.2",
|
||||
"vscode-nls": "2.0.2"
|
||||
|
||||
@@ -105,6 +105,11 @@ export function expandEmmetAbbreviation(args: any): Thenable<boolean | undefined
|
||||
args = args || {};
|
||||
if (!args['language']) {
|
||||
args['language'] = vscode.window.activeTextEditor.document.languageId;
|
||||
} else {
|
||||
const excludedLanguages = vscode.workspace.getConfiguration('emmet')['excludeLanguages'] ? vscode.workspace.getConfiguration('emmet')['excludeLanguages'] : [];
|
||||
if (excludedLanguages.indexOf(vscode.window.activeTextEditor.document.languageId) > -1) {
|
||||
return fallbackTab();
|
||||
}
|
||||
}
|
||||
const syntax = getSyntaxFromArgs(args);
|
||||
if (!syntax) {
|
||||
@@ -176,7 +181,7 @@ export function expandEmmetAbbreviation(args: any): Thenable<boolean | undefined
|
||||
}
|
||||
|
||||
let currentNode = getNode(rootNode, position, true);
|
||||
if (!isValidLocationForEmmetAbbreviation(currentNode, syntax, position)) {
|
||||
if (!isValidLocationForEmmetAbbreviation(editor.document, currentNode, syntax, position, rangeToReplace)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -205,11 +210,13 @@ function fallbackTab(): Thenable<boolean | undefined> {
|
||||
/**
|
||||
* Checks if given position is a valid location to expand emmet abbreviation.
|
||||
* Works only on html and css/less/scss syntax
|
||||
* @param document current Text Document
|
||||
* @param currentNode parsed node at given position
|
||||
* @param syntax syntax of the abbreviation
|
||||
* @param position position to validate
|
||||
* @param abbreviationRange The range of the abbreviation for which given position is being validated
|
||||
*/
|
||||
export function isValidLocationForEmmetAbbreviation(currentNode: Node | null, syntax: string, position: vscode.Position): boolean {
|
||||
export function isValidLocationForEmmetAbbreviation(document: vscode.TextDocument, currentNode: Node | null, syntax: string, position: vscode.Position, abbreviationRange: vscode.Range): boolean {
|
||||
// Continue validation only if the file was parse-able and the currentNode has been found
|
||||
if (!currentNode) {
|
||||
return true;
|
||||
@@ -242,13 +249,64 @@ export function isValidLocationForEmmetAbbreviation(currentNode: Node | null, sy
|
||||
return false;
|
||||
}
|
||||
|
||||
const startAngle = '<';
|
||||
const endAngle = '>';
|
||||
const escape = '\\';
|
||||
const currentHtmlNode = <HtmlNode>currentNode;
|
||||
if (currentHtmlNode.close) {
|
||||
const innerRange = getInnerRange(currentHtmlNode);
|
||||
return !!innerRange && innerRange.contains(position);
|
||||
const innerRange = getInnerRange(currentHtmlNode);
|
||||
|
||||
// Fix for https://github.com/Microsoft/vscode/issues/28829
|
||||
if (!innerRange || !innerRange.contains(position)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
// Fix for https://github.com/Microsoft/vscode/issues/35128
|
||||
// Find the position up till where we will backtrack looking for unescaped < or >
|
||||
// to decide if current position is valid for emmet expansion
|
||||
let start = innerRange.start;
|
||||
let lastChildBeforePosition = currentHtmlNode.firstChild;
|
||||
while (lastChildBeforePosition) {
|
||||
if (lastChildBeforePosition.end.isAfter(position)) {
|
||||
break;
|
||||
}
|
||||
start = lastChildBeforePosition.end;
|
||||
lastChildBeforePosition = lastChildBeforePosition.nextSibling;
|
||||
}
|
||||
let textToBackTrack = document.getText(new vscode.Range(start, abbreviationRange.start));
|
||||
|
||||
// Worse case scenario is when cursor is inside a big chunk of text which needs to backtracked
|
||||
// Backtrack only 500 offsets to ensure we dont waste time doing this
|
||||
if (textToBackTrack.length > 500) {
|
||||
textToBackTrack = textToBackTrack.substr(textToBackTrack.length - 500);
|
||||
}
|
||||
|
||||
let valid = true;
|
||||
let foundSpace = false; // If < is found before finding whitespace, then its valid abbreviation. Eg: <div|
|
||||
let i = textToBackTrack.length - 1;
|
||||
while (i >= 0) {
|
||||
const char = textToBackTrack[i];
|
||||
i--;
|
||||
if (!foundSpace && /\s/.test(char)) {
|
||||
foundSpace = true;
|
||||
continue;
|
||||
}
|
||||
if (char !== startAngle && char !== endAngle) {
|
||||
continue;
|
||||
}
|
||||
if (i >= 0 && textToBackTrack[i] === escape) {
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
if (char === endAngle) {
|
||||
break;
|
||||
}
|
||||
if (char === startAngle) {
|
||||
valid = !foundSpace;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return valid;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -343,9 +401,13 @@ function expandAbbr(input: ExpandAbbreviationInput): string | undefined {
|
||||
|
||||
function getSyntaxFromArgs(args: Object): string | undefined {
|
||||
const mappedModes = getMappingForIncludedLanguages();
|
||||
let language: string = args['language'];
|
||||
let parentMode: string = args['parentMode'];
|
||||
let excludedLanguages = vscode.workspace.getConfiguration('emmet')['excludeLanguages'] ? vscode.workspace.getConfiguration('emmet')['excludeLanguages'] : [];
|
||||
const language: string = args['language'];
|
||||
const parentMode: string = args['parentMode'];
|
||||
const excludedLanguages = vscode.workspace.getConfiguration('emmet')['excludeLanguages'] ? vscode.workspace.getConfiguration('emmet')['excludeLanguages'] : [];
|
||||
if (excludedLanguages.indexOf(language) > -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
let syntax = getEmmetMode((mappedModes[language] ? mappedModes[language] : language), excludedLanguages);
|
||||
if (!syntax) {
|
||||
syntax = getEmmetMode((mappedModes[parentMode] ? mappedModes[parentMode] : parentMode), excludedLanguages);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import { HtmlNode } from 'EmmetNode';
|
||||
import { HtmlNode, Node } from 'EmmetNode';
|
||||
import { isValidLocationForEmmetAbbreviation } from './abbreviationActions';
|
||||
import { getEmmetHelper, getNode, getInnerRange, getMappingForIncludedLanguages, parseDocument, getEmmetConfiguration, getEmmetMode, isStyleSheet } from './util';
|
||||
|
||||
@@ -13,17 +13,37 @@ const allowedMimeTypesInScriptTag = ['text/html', 'text/plain', 'text/x-template
|
||||
export class DefaultCompletionItemProvider implements vscode.CompletionItemProvider {
|
||||
|
||||
public provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): Thenable<vscode.CompletionList | undefined> | undefined {
|
||||
const mappedLanguages = getMappingForIncludedLanguages();
|
||||
const emmetConfig = vscode.workspace.getConfiguration('emmet');
|
||||
const excludedLanguages = emmetConfig['excludeLanguages'] ? emmetConfig['excludeLanguages'] : [];
|
||||
if (excludedLanguages.indexOf(document.languageId) > -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
let isSyntaxMapped = mappedLanguages[document.languageId] ? true : false;
|
||||
let excludedLanguages = emmetConfig['excludeLanguages'] ? emmetConfig['excludeLanguages'] : [];
|
||||
const mappedLanguages = getMappingForIncludedLanguages();
|
||||
const isSyntaxMapped = mappedLanguages[document.languageId] ? true : false;
|
||||
let syntax = getEmmetMode((isSyntaxMapped ? mappedLanguages[document.languageId] : document.languageId), excludedLanguages);
|
||||
|
||||
const helper = getEmmetHelper();
|
||||
const extractAbbreviationResults = helper.extractAbbreviation(document, position);
|
||||
if (!extractAbbreviationResults) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If document can be html/css parsed, validate syntax and location
|
||||
if (document.languageId === 'html' || isStyleSheet(document.languageId)) {
|
||||
// Document can be html/css parsed
|
||||
// Use syntaxHelper to parse file, validate location and update sytnax if needed
|
||||
syntax = this.syntaxHelper(syntax, document, position);
|
||||
const rootNode = parseDocument(document, false);
|
||||
if (!rootNode) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Use syntaxHelper to update sytnax if needed
|
||||
const currentNode = getNode(rootNode, position, true);
|
||||
syntax = this.syntaxHelper(syntax, currentNode, position);
|
||||
|
||||
// Validate location
|
||||
if (!syntax || !isValidLocationForEmmetAbbreviation(document, currentNode, syntax, position, extractAbbreviationResults.abbreviationRange)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!syntax
|
||||
@@ -32,23 +52,19 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi
|
||||
return;
|
||||
}
|
||||
|
||||
const helper = getEmmetHelper();
|
||||
let noiseCheckPromise: Thenable<any> = Promise.resolve();
|
||||
|
||||
// Fix for https://github.com/Microsoft/vscode/issues/32647
|
||||
// Check for document symbols in js/ts/jsx/tsx and avoid triggering emmet for abbreviations of the form symbolName.sometext
|
||||
// Presence of > or * or + in the abbreviation denotes valid abbreviation that should trigger emmet
|
||||
if (!isStyleSheet(syntax) && (document.languageId === 'javascript' || document.languageId === 'javascriptreact' || document.languageId === 'typescript' || document.languageId === 'typescriptreact')) {
|
||||
let extractAbbreviationResults = helper.extractAbbreviation(document, position);
|
||||
if (extractAbbreviationResults) {
|
||||
let abbreviation: string = extractAbbreviationResults.abbreviation;
|
||||
if (abbreviation.startsWith('this.')) {
|
||||
noiseCheckPromise = Promise.resolve(true);
|
||||
} else {
|
||||
noiseCheckPromise = vscode.commands.executeCommand<vscode.SymbolInformation[]>('vscode.executeDocumentSymbolProvider', document.uri).then((symbols: vscode.SymbolInformation[] | undefined) => {
|
||||
return symbols && symbols.find(x => abbreviation === x.name || (abbreviation.startsWith(x.name + '.') && !/>|\*|\+/.test(abbreviation)));
|
||||
});
|
||||
}
|
||||
let abbreviation: string = extractAbbreviationResults.abbreviation;
|
||||
if (abbreviation.startsWith('this.')) {
|
||||
noiseCheckPromise = Promise.resolve(true);
|
||||
} else {
|
||||
noiseCheckPromise = vscode.commands.executeCommand<vscode.SymbolInformation[]>('vscode.executeDocumentSymbolProvider', document.uri).then((symbols: vscode.SymbolInformation[] | undefined) => {
|
||||
return symbols && symbols.find(x => abbreviation === x.name || (abbreviation.startsWith(x.name + '.') && !/>|\*|\+/.test(abbreviation)));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,21 +101,11 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi
|
||||
/**
|
||||
* Parses given document to check whether given position is valid for emmet abbreviation and returns appropriate syntax
|
||||
* @param syntax string language mode of current document
|
||||
* @param document vscode.Textdocument
|
||||
* @param currentNode node in the document that contains the position
|
||||
* @param position vscode.Position position of the abbreviation that needs to be expanded
|
||||
*/
|
||||
private syntaxHelper(syntax: string | undefined, document: vscode.TextDocument, position: vscode.Position): string | undefined {
|
||||
if (!syntax) {
|
||||
return syntax;
|
||||
}
|
||||
let rootNode = parseDocument(document, false);
|
||||
if (!rootNode) {
|
||||
return;
|
||||
}
|
||||
|
||||
let currentNode = getNode(rootNode, position, true);
|
||||
|
||||
if (!isStyleSheet(syntax)) {
|
||||
private syntaxHelper(syntax: string | undefined, currentNode: Node | null, position: vscode.Position): string | undefined {
|
||||
if (syntax && !isStyleSheet(syntax)) {
|
||||
const currentHtmlNode = <HtmlNode>currentNode;
|
||||
if (currentHtmlNode && currentHtmlNode.close) {
|
||||
const innerRange = getInnerRange(currentHtmlNode);
|
||||
@@ -118,9 +124,6 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi
|
||||
}
|
||||
}
|
||||
|
||||
if (!isValidLocationForEmmetAbbreviation(currentNode, syntax, position)) {
|
||||
return;
|
||||
}
|
||||
return syntax;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ const htmlContents = `
|
||||
ul>li*2
|
||||
ul>li.item$*2
|
||||
ul>li.item$@44*2
|
||||
<div
|
||||
<div i
|
||||
</ul>
|
||||
<style>
|
||||
.boo {
|
||||
@@ -119,47 +119,51 @@ suite('Tests for Expand Abbreviations (HTML)', () => {
|
||||
});
|
||||
|
||||
test('Expand snippets (HTML)', () => {
|
||||
return testHtmlExpandAbbreviation(new Selection(3, 23, 3, 23), 'img', '<img src=\"\" alt=\"\">');
|
||||
return testExpandAbbreviation('html', new Selection(3, 23, 3, 23), 'img', '<img src=\"\" alt=\"\">');
|
||||
});
|
||||
|
||||
test('Expand abbreviation (HTML)', () => {
|
||||
return testHtmlExpandAbbreviation(new Selection(5, 25, 5, 25), 'ul>li', '<ul>\n\t\t\t<li></li>\n\t\t</ul>');
|
||||
return testExpandAbbreviation('html', new Selection(5, 25, 5, 25), 'ul>li', '<ul>\n\t\t\t<li></li>\n\t\t</ul>');
|
||||
});
|
||||
|
||||
test('Expand text that is neither an abbreviation nor a snippet to tags (HTML)', () => {
|
||||
return testHtmlExpandAbbreviation(new Selection(4, 20, 4, 27), 'hithere', '<hithere></hithere>');
|
||||
return testExpandAbbreviation('html', new Selection(4, 20, 4, 27), 'hithere', '<hithere></hithere>');
|
||||
});
|
||||
|
||||
test('Expand abbreviation with repeaters (HTML)', () => {
|
||||
return testHtmlExpandAbbreviation(new Selection(6, 27, 6, 27), 'ul>li*2', '<ul>\n\t\t\t<li></li>\n\t\t\t<li></li>\n\t\t</ul>');
|
||||
return testExpandAbbreviation('html', new Selection(6, 27, 6, 27), 'ul>li*2', '<ul>\n\t\t\t<li></li>\n\t\t\t<li></li>\n\t\t</ul>');
|
||||
});
|
||||
|
||||
test('Expand abbreviation with numbered repeaters (HTML)', () => {
|
||||
return testHtmlExpandAbbreviation(new Selection(7, 33, 7, 33), 'ul>li.item$*2', '<ul>\n\t\t\t<li class="item1"></li>\n\t\t\t<li class="item2"></li>\n\t\t</ul>');
|
||||
return testExpandAbbreviation('html', new Selection(7, 33, 7, 33), 'ul>li.item$*2', '<ul>\n\t\t\t<li class="item1"></li>\n\t\t\t<li class="item2"></li>\n\t\t</ul>');
|
||||
});
|
||||
|
||||
test('Expand abbreviation with numbered repeaters with offset (HTML)', () => {
|
||||
return testHtmlExpandAbbreviation(new Selection(8, 36, 8, 36), 'ul>li.item$@44*2', '<ul>\n\t\t\t<li class="item44"></li>\n\t\t\t<li class="item45"></li>\n\t\t</ul>');
|
||||
return testExpandAbbreviation('html', new Selection(8, 36, 8, 36), 'ul>li.item$@44*2', '<ul>\n\t\t\t<li class="item44"></li>\n\t\t\t<li class="item45"></li>\n\t\t</ul>');
|
||||
});
|
||||
|
||||
test('Expand abbreviation with numbered repeaters in groups (HTML)', () => {
|
||||
return testHtmlExpandAbbreviation(new Selection(17, 16, 17, 16), '(ul>li.item$)*2', '<ul>\n\t\t<li class="item1"></li>\n\t</ul>\n\t<ul>\n\t\t<li class="item2"></li>\n\t</ul>');
|
||||
return testExpandAbbreviation('html', new Selection(17, 16, 17, 16), '(ul>li.item$)*2', '<ul>\n\t\t<li class="item1"></li>\n\t</ul>\n\t<ul>\n\t\t<li class="item2"></li>\n\t</ul>');
|
||||
});
|
||||
|
||||
test('Expand abbreviation with numbered repeaters in groups with sibling in the end (HTML)', () => {
|
||||
return testHtmlExpandAbbreviation(new Selection(18, 21, 18, 21), '(ul>li.item$)*2+span', '<ul>\n\t\t<li class="item1"></li>\n\t</ul>\n\t<ul>\n\t\t<li class="item2"></li>\n\t</ul>\n\t<span></span>');
|
||||
return testExpandAbbreviation('html', new Selection(18, 21, 18, 21), '(ul>li.item$)*2+span', '<ul>\n\t\t<li class="item1"></li>\n\t</ul>\n\t<ul>\n\t\t<li class="item2"></li>\n\t</ul>\n\t<span></span>');
|
||||
});
|
||||
|
||||
test('Expand abbreviation with nested groups (HTML)', () => {
|
||||
return testHtmlExpandAbbreviation(new Selection(19, 19, 19, 19), '(div>dl>(dt+dd)*2)', '<div>\n\t\t<dl>\n\t\t\t<dt></dt>\n\t\t\t<dd></dd>\n\t\t\t<dt></dt>\n\t\t\t<dd></dd>\n\t\t</dl>\n\t</div>');
|
||||
return testExpandAbbreviation('html', new Selection(19, 19, 19, 19), '(div>dl>(dt+dd)*2)', '<div>\n\t\t<dl>\n\t\t\t<dt></dt>\n\t\t\t<dd></dd>\n\t\t\t<dt></dt>\n\t\t\t<dd></dd>\n\t\t</dl>\n\t</div>');
|
||||
});
|
||||
|
||||
test('Expand tag that is opened, but not closed (HTML)', () => {
|
||||
return testHtmlExpandAbbreviation(new Selection(9, 6, 9, 6), '<div', '<div></div>');
|
||||
return testExpandAbbreviation('html', new Selection(9, 6, 9, 6), '<div', '<div></div>');
|
||||
});
|
||||
|
||||
test('No expanding text inside open tag (HTML)', () => {
|
||||
return testHtmlExpandAbbreviation(new Selection(2, 4, 2, 4), '', '', true);
|
||||
return testExpandAbbreviation('html', new Selection(2, 4, 2, 4), '', '', true);
|
||||
});
|
||||
|
||||
test('No expanding text inside open tag when there is no closing tag (HTML)', () => {
|
||||
return testExpandAbbreviation('html', new Selection(9, 8, 9, 8), '', '', true);
|
||||
});
|
||||
|
||||
test('Expand css when inside style tag (HTML)', () => {
|
||||
@@ -178,12 +182,21 @@ suite('Tests for Expand Abbreviations (HTML)', () => {
|
||||
|
||||
test('No expanding when html is excluded in the settings', () => {
|
||||
return workspace.getConfiguration('emmet').update('excludeLanguages', ['html']).then(() => {
|
||||
return testHtmlExpandAbbreviation(new Selection(9, 6, 9, 6), '', '', true).then(() => {
|
||||
return testExpandAbbreviation('html', new Selection(9, 6, 9, 6), '', '', true).then(() => {
|
||||
return workspace.getConfiguration('emmet').update('excludeLanguages', []);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('No expanding when php (mapped syntax) is excluded in the settings', () => {
|
||||
return workspace.getConfiguration('emmet').update('excludeLanguages', ['php']).then(() => {
|
||||
return testExpandAbbreviation('php', new Selection(9, 6, 9, 6), '', '', true).then(() => {
|
||||
return workspace.getConfiguration('emmet').update('excludeLanguages', []);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
suite('Tests for Expand Abbreviations (CSS)', () => {
|
||||
@@ -298,14 +311,14 @@ suite('Tests for Wrap with Abbreviations', () => {
|
||||
const contents = `
|
||||
<ul class="nav main">
|
||||
<li class="item1">img</li>
|
||||
<li class="item2">hithere</li>
|
||||
<li class="item2">hi.there</li>
|
||||
</ul>
|
||||
`;
|
||||
const wrapIndividualLinesExpected = `
|
||||
<ul class="nav main">
|
||||
<ul>
|
||||
<li class="hello1"><li class="item1">img</li></li>
|
||||
<li class="hello2"><li class="item2">hithere</li></li>
|
||||
<li class="hello2"><li class="item2">hi.there</li></li>
|
||||
</ul>
|
||||
</ul>
|
||||
`;
|
||||
@@ -399,8 +412,8 @@ suite('Tests for jsx, xml and xsl', () => {
|
||||
|
||||
});
|
||||
|
||||
function testHtmlExpandAbbreviation(selection: Selection, abbreviation: string, expandedText: string, shouldFail?: boolean): Thenable<any> {
|
||||
return withRandomFileEditor(htmlContents, 'html', (editor, doc) => {
|
||||
function testExpandAbbreviation(syntax: string, selection: Selection, abbreviation: string, expandedText: string, shouldFail?: boolean): Thenable<any> {
|
||||
return withRandomFileEditor(htmlContents, syntax, (editor, doc) => {
|
||||
editor.selection = selection;
|
||||
let expandPromise = expandEmmetAbbreviation(null);
|
||||
if (!expandPromise) {
|
||||
|
||||
@@ -2048,9 +2048,9 @@ vinyl@~2.0.1:
|
||||
remove-trailing-separator "^1.0.1"
|
||||
replace-ext "^1.0.0"
|
||||
|
||||
vscode-emmet-helper@^1.1.18:
|
||||
version "1.1.18"
|
||||
resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-1.1.18.tgz#6209a3cda3cb04d98d69ebfaa55a7bdf2dc2d83f"
|
||||
vscode-emmet-helper@^1.1.19:
|
||||
version "1.1.19"
|
||||
resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-1.1.19.tgz#e5b607076171555c6be3655a8eb11c17f980b2dd"
|
||||
dependencies:
|
||||
"@emmetio/extract-abbreviation" "^0.1.1"
|
||||
vscode-languageserver-types "^3.0.3"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
'use strict';
|
||||
|
||||
import { window, workspace, Uri, Disposable, Event, EventEmitter, DecorationData, DecorationProvider, ThemeColor } from 'vscode';
|
||||
import { Repository, GitResourceGroup } from './repository';
|
||||
import { Repository, GitResourceGroup, Status } from './repository';
|
||||
import { Model } from './model';
|
||||
import { debounce } from './decorators';
|
||||
import { filterEvent } from './util';
|
||||
@@ -84,24 +84,18 @@ class GitDecorationProvider implements DecorationProvider {
|
||||
this.collectDecorationData(this.repository.workingTreeGroup, newDecorations);
|
||||
this.collectDecorationData(this.repository.mergeGroup, newDecorations);
|
||||
|
||||
let uris: Uri[] = [];
|
||||
newDecorations.forEach((value, uriString) => {
|
||||
if (this.decorations.has(uriString)) {
|
||||
this.decorations.delete(uriString);
|
||||
} else {
|
||||
uris.push(Uri.parse(uriString));
|
||||
}
|
||||
});
|
||||
this.decorations.forEach((value, uriString) => {
|
||||
uris.push(Uri.parse(uriString));
|
||||
});
|
||||
const uris = new Set([...this.decorations.keys()].concat([...newDecorations.keys()]));
|
||||
this.decorations = newDecorations;
|
||||
this._onDidChangeDecorations.fire(uris);
|
||||
this._onDidChangeDecorations.fire([...uris.values()].map(Uri.parse));
|
||||
}
|
||||
|
||||
private collectDecorationData(group: GitResourceGroup, bucket: Map<string, DecorationData>): void {
|
||||
group.resourceStates.forEach(r => {
|
||||
if (r.resourceDecoration) {
|
||||
if (r.resourceDecoration
|
||||
&& r.type !== Status.DELETED
|
||||
&& r.type !== Status.INDEX_DELETED
|
||||
) {
|
||||
// not deleted and has a decoration
|
||||
bucket.set(r.original.toString(), r.resourceDecoration);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -171,10 +171,8 @@ export class Resource implements SourceControlResourceState {
|
||||
}
|
||||
|
||||
get decorations(): SourceControlResourceDecorations {
|
||||
// TODO@joh, still requires restart/redraw in the SCM viewlet
|
||||
const decorations = workspace.getConfiguration().get<boolean>('git.decorations.enabled');
|
||||
const light = !decorations ? { iconPath: this.getIconPath('light') } : undefined;
|
||||
const dark = !decorations ? { iconPath: this.getIconPath('dark') } : undefined;
|
||||
const light = this._useIcons ? { iconPath: this.getIconPath('light') } : undefined;
|
||||
const dark = this._useIcons ? { iconPath: this.getIconPath('dark') } : undefined;
|
||||
const tooltip = this.tooltip;
|
||||
const strikeThrough = this.strikeThrough;
|
||||
const faded = this.faded;
|
||||
@@ -275,6 +273,7 @@ export class Resource implements SourceControlResourceState {
|
||||
private _resourceGroupType: ResourceGroupType,
|
||||
private _resourceUri: Uri,
|
||||
private _type: Status,
|
||||
private _useIcons: boolean,
|
||||
private _renameResourceUri?: Uri
|
||||
) { }
|
||||
}
|
||||
@@ -863,6 +862,7 @@ export class Repository implements Disposable {
|
||||
const { status, didHitLimit } = await this.repository.getStatus();
|
||||
const config = workspace.getConfiguration('git');
|
||||
const shouldIgnore = config.get<boolean>('ignoreLimitWarning') === true;
|
||||
const useIcons = config.get<boolean>('decorations.enabled', true);
|
||||
|
||||
this.isRepositoryHuge = didHitLimit;
|
||||
|
||||
@@ -910,30 +910,30 @@ export class Repository implements Disposable {
|
||||
const renameUri = raw.rename ? Uri.file(path.join(this.repository.root, raw.rename)) : undefined;
|
||||
|
||||
switch (raw.x + raw.y) {
|
||||
case '??': return workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.UNTRACKED));
|
||||
case '!!': return workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.IGNORED));
|
||||
case 'DD': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.BOTH_DELETED));
|
||||
case 'AU': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.ADDED_BY_US));
|
||||
case 'UD': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.DELETED_BY_THEM));
|
||||
case 'UA': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.ADDED_BY_THEM));
|
||||
case 'DU': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.DELETED_BY_US));
|
||||
case 'AA': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.BOTH_ADDED));
|
||||
case 'UU': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.BOTH_MODIFIED));
|
||||
case '??': return workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.UNTRACKED, useIcons));
|
||||
case '!!': return workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.IGNORED, useIcons));
|
||||
case 'DD': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.BOTH_DELETED, useIcons));
|
||||
case 'AU': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.ADDED_BY_US, useIcons));
|
||||
case 'UD': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.DELETED_BY_THEM, useIcons));
|
||||
case 'UA': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.ADDED_BY_THEM, useIcons));
|
||||
case 'DU': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.DELETED_BY_US, useIcons));
|
||||
case 'AA': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.BOTH_ADDED, useIcons));
|
||||
case 'UU': return merge.push(new Resource(ResourceGroupType.Merge, uri, Status.BOTH_MODIFIED, useIcons));
|
||||
}
|
||||
|
||||
let isModifiedInIndex = false;
|
||||
|
||||
switch (raw.x) {
|
||||
case 'M': index.push(new Resource(ResourceGroupType.Index, uri, Status.INDEX_MODIFIED)); isModifiedInIndex = true; break;
|
||||
case 'A': index.push(new Resource(ResourceGroupType.Index, uri, Status.INDEX_ADDED)); break;
|
||||
case 'D': index.push(new Resource(ResourceGroupType.Index, uri, Status.INDEX_DELETED)); break;
|
||||
case 'R': index.push(new Resource(ResourceGroupType.Index, uri, Status.INDEX_RENAMED, renameUri)); break;
|
||||
case 'C': index.push(new Resource(ResourceGroupType.Index, uri, Status.INDEX_COPIED, renameUri)); break;
|
||||
case 'M': index.push(new Resource(ResourceGroupType.Index, uri, Status.INDEX_MODIFIED, useIcons)); isModifiedInIndex = true; break;
|
||||
case 'A': index.push(new Resource(ResourceGroupType.Index, uri, Status.INDEX_ADDED, useIcons)); break;
|
||||
case 'D': index.push(new Resource(ResourceGroupType.Index, uri, Status.INDEX_DELETED, useIcons)); break;
|
||||
case 'R': index.push(new Resource(ResourceGroupType.Index, uri, Status.INDEX_RENAMED, useIcons, renameUri)); break;
|
||||
case 'C': index.push(new Resource(ResourceGroupType.Index, uri, Status.INDEX_COPIED, useIcons, renameUri)); break;
|
||||
}
|
||||
|
||||
switch (raw.y) {
|
||||
case 'M': workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.MODIFIED, renameUri)); break;
|
||||
case 'D': workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.DELETED, renameUri)); break;
|
||||
case 'M': workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.MODIFIED, useIcons, renameUri)); break;
|
||||
case 'D': workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.DELETED, useIcons, renameUri)); break;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -26,6 +26,6 @@
|
||||
],
|
||||
"indentationRules": {
|
||||
"increaseIndentPattern": "^.*(\\bcase\\b.*:|\\bdefault\\b:|(\\b(func|if|else|switch|select|for|struct)\\b.*)?{[^}]*|\\([^)]*)$",
|
||||
"decreaseIndentPattern": "^\\s*(\\bcase\\b.*:|\\bdefault\\b:|}[),]?|\\)[,]?)$"
|
||||
"decreaseIndentPattern": "^\\s*(\\bcase\\b.*:|\\bdefault\\b:|}[)}]*[),]?|\\)[,]?)$"
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import * as path from 'path';
|
||||
|
||||
import { languages, ExtensionContext, IndentAction, Position, TextDocument, Color, ColorInformation, ColorPresentation } from 'vscode';
|
||||
import { languages, ExtensionContext, IndentAction, Position, TextDocument, Color, ColorInformation, ColorPresentation, Range, CompletionItem, CompletionItemKind, SnippetString } from 'vscode';
|
||||
import { LanguageClient, LanguageClientOptions, ServerOptions, TransportKind, RequestType, TextDocumentPositionParams } from 'vscode-languageclient';
|
||||
import { EMPTY_ELEMENTS } from './htmlEmptyTagsShared';
|
||||
import { activateTagClosing } from './tagClosing';
|
||||
@@ -163,6 +163,31 @@ export function activate(context: ExtensionContext) {
|
||||
}
|
||||
],
|
||||
});
|
||||
|
||||
const regionCompletionRegExpr = /^(\s*)(<(!(-(-\s*(#\w*)?)?)?)?)?/;
|
||||
languages.registerCompletionItemProvider(documentSelector, {
|
||||
provideCompletionItems(doc, pos) {
|
||||
let lineUntilPos = doc.getText(new Range(new Position(pos.line, 0), pos));
|
||||
let match = lineUntilPos.match(regionCompletionRegExpr);
|
||||
if (match) {
|
||||
let range = new Range(new Position(pos.line, match[1].length), pos);
|
||||
let beginProposal = new CompletionItem('#region', CompletionItemKind.Snippet);
|
||||
beginProposal.range = range;
|
||||
beginProposal.insertText = new SnippetString('<!-- #region $1-->');
|
||||
beginProposal.documentation = localize('folding.start', 'Folding Region Start');
|
||||
beginProposal.filterText = match[2];
|
||||
beginProposal.sortText = 'za';
|
||||
let endProposal = new CompletionItem('#endregion', CompletionItemKind.Snippet);
|
||||
endProposal.range = range;
|
||||
endProposal.insertText = new SnippetString('<!-- #endregion -->');
|
||||
endProposal.documentation = localize('folding.end', 'Folding Region End');
|
||||
endProposal.filterText = match[2];
|
||||
endProposal.sortText = 'zb';
|
||||
return [beginProposal, endProposal];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getPackageInfo(context: ExtensionContext): IPackageInfo | null {
|
||||
|
||||
@@ -22,5 +22,11 @@
|
||||
{ "open": "[", "close": "]"},
|
||||
{ "open": "(", "close": ")" },
|
||||
{ "open": "<", "close": ">" }
|
||||
]
|
||||
],
|
||||
"folding": {
|
||||
"markers": {
|
||||
"start": "^\\s*<!--\\s*#region\\b.*-->",
|
||||
"end": "^^\\s*<!--\\s*#endregion\\b.*-->"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -67,6 +67,16 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"folding": {
|
||||
"markers": {
|
||||
"start": "^\\s*<!--\\s*#region\\b\\s*(.*?)-->/",
|
||||
"end": "^\\s*<!--\\s*#endregion\\b\\s*(.*?)-->/"
|
||||
}
|
||||
},
|
||||
"snippets": [{
|
||||
"language": "html",
|
||||
"path": "./snippets/html.snippets.json"
|
||||
}],
|
||||
"configuration": {
|
||||
"id": "html",
|
||||
"order": 20,
|
||||
|
||||
@@ -9,22 +9,22 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"vscode-css-languageservice": "^3.0.1",
|
||||
"vscode-html-languageservice": "^2.0.11",
|
||||
"vscode-html-languageservice": "^2.0.12",
|
||||
"vscode-languageserver": "^3.5.0",
|
||||
"vscode-nls": "^2.0.2",
|
||||
"vscode-uri": "^1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.0.43",
|
||||
"@types/mocha": "2.2.33"
|
||||
"@types/mocha": "2.2.33",
|
||||
"@types/node": "7.0.43"
|
||||
},
|
||||
"scripts": {
|
||||
"compile": "gulp compile-extension:html-server",
|
||||
"watch": "gulp watch-extension:html-server",
|
||||
"install-service-next": "npm install vscode-css-languageservice@next -f -S && npm install vscode-html-languageservice@next -f -S",
|
||||
"install-service-local": "npm install ../../../../vscode-css-languageservice -f -S && npm install ../../../../vscode-html-languageservice -f -S",
|
||||
"install-server-next": "npm install vscode-languageserver@next -f -S",
|
||||
"install-server-local": "npm install ../../../../vscode-languageserver-node/server -f -S",
|
||||
"install-service-next": "yarn add vscode-css-languageservice@next && yarn add vscode-html-languageservice@next",
|
||||
"install-service-local": "npm install ../../../../vscode-css-languageservice -f && npm install ../../../../vscode-html-languageservice -f",
|
||||
"install-server-next": "yarn add vscode-languageserver@next",
|
||||
"install-server-local": "npm install ../../../../vscode-languageserver-node/server -f",
|
||||
"test": "../../../node_modules/.bin/mocha"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ connection.onInitialize((params: InitializeParams): InitializeResult => {
|
||||
let capabilities: ServerCapabilities & CPServerCapabilities = {
|
||||
// Tell the client that the server works in FULL text document sync mode
|
||||
textDocumentSync: documents.syncKind,
|
||||
completionProvider: clientSnippetSupport ? { resolveProvider: true, triggerCharacters: ['.', ':', '<', '"', '=', '/', '>'] } : undefined,
|
||||
completionProvider: clientSnippetSupport ? { resolveProvider: true, triggerCharacters: ['.', ':', '<', '"', '=', '/'] } : undefined,
|
||||
hoverProvider: true,
|
||||
documentHighlightProvider: true,
|
||||
documentRangeFormattingProvider: false,
|
||||
|
||||
@@ -17,9 +17,9 @@ vscode-css-languageservice@^3.0.1:
|
||||
vscode-languageserver-types "3.5.0"
|
||||
vscode-nls "^2.0.1"
|
||||
|
||||
vscode-html-languageservice@^2.0.11:
|
||||
version "2.0.11"
|
||||
resolved "https://registry.yarnpkg.com/vscode-html-languageservice/-/vscode-html-languageservice-2.0.11.tgz#84da1ba56a1334d56b1b3ed4a8d51874c1f5436d"
|
||||
vscode-html-languageservice@^2.0.12:
|
||||
version "2.0.12"
|
||||
resolved "https://registry.yarnpkg.com/vscode-html-languageservice/-/vscode-html-languageservice-2.0.12.tgz#de85796138561414a43755471c77b0e28f264582"
|
||||
dependencies:
|
||||
vscode-languageserver-types "3.5.0"
|
||||
vscode-nls "^2.0.2"
|
||||
|
||||
@@ -7,16 +7,16 @@
|
||||
"<head>",
|
||||
"\t<meta charset=\"utf-8\" />",
|
||||
"\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">",
|
||||
"\t<title>{{Page Title}}</title>",
|
||||
"\t<title>${1:Page Title}</title>",
|
||||
"\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">",
|
||||
"\t<link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"{{main.css}}\" />",
|
||||
"\t<script src=\"{{main.js}}\"></script>",
|
||||
"\t<link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"${2:main.css}\" />",
|
||||
"\t<script src=\"${3:main.js}\"></script>",
|
||||
"</head>",
|
||||
"<body>",
|
||||
"\t{{}}",
|
||||
"\t$0",
|
||||
"</body>",
|
||||
"</html>"
|
||||
],
|
||||
"description": "Simple HTML5 starting point"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,10 @@
|
||||
"language": "java",
|
||||
"scopeName": "source.java",
|
||||
"path": "./syntaxes/java.tmLanguage.json"
|
||||
}],
|
||||
"snippets": [{
|
||||
"language": "java",
|
||||
"path": "./snippets/java.snippets.json"
|
||||
}]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"Region Start": {
|
||||
"prefix": "#region",
|
||||
"body": [
|
||||
"//#region"
|
||||
],
|
||||
"description": "Folding Region Start"
|
||||
},
|
||||
"Region End": {
|
||||
"prefix": "#endregion",
|
||||
"body": [
|
||||
"//#endregion"
|
||||
],
|
||||
"description": "Folding Region End"
|
||||
}
|
||||
}
|
||||
@@ -25,5 +25,11 @@
|
||||
"indentationRules": {
|
||||
"increaseIndentPattern": "(^.*\\{[^}]*$)",
|
||||
"decreaseIndentPattern": "^\\s*\\}"
|
||||
},
|
||||
"folding": {
|
||||
"markers": {
|
||||
"start": "^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/",
|
||||
"end": "^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,7 +53,7 @@
|
||||
"snippets": [
|
||||
{
|
||||
"language": "php",
|
||||
"path": "./snippets/php.json"
|
||||
"path": "./snippets/php.snippets.json"
|
||||
}
|
||||
],
|
||||
"configuration": {
|
||||
|
||||
@@ -234,5 +234,19 @@
|
||||
"$0"
|
||||
],
|
||||
"description": "Throw exception"
|
||||
},
|
||||
"Region Start": {
|
||||
"prefix": "#region",
|
||||
"body": [
|
||||
"#region"
|
||||
],
|
||||
"description": "Folding Region Start"
|
||||
},
|
||||
"Region End": {
|
||||
"prefix": "#endregion",
|
||||
"body": [
|
||||
"#endregion"
|
||||
],
|
||||
"description": "Folding Region End"
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,23 @@
|
||||
{ "open": "[", "close": "]" },
|
||||
{ "open": "(", "close": ")" },
|
||||
{ "open": "\"", "close": "\"", "notIn": ["string"] },
|
||||
{ "open": "'", "close": "'", "notIn": ["string", "comment"] }
|
||||
{ "open": "r\"", "close": "\"", "notIn": ["string", "comment"] },
|
||||
{ "open": "R\"", "close": "\"", "notIn": ["string", "comment"] },
|
||||
{ "open": "u\"", "close": "\"", "notIn": ["string", "comment"] },
|
||||
{ "open": "U\"", "close": "\"", "notIn": ["string", "comment"] },
|
||||
{ "open": "f\"", "close": "\"", "notIn": ["string", "comment"] },
|
||||
{ "open": "F\"", "close": "\"", "notIn": ["string", "comment"] },
|
||||
{ "open": "b\"", "close": "\"", "notIn": ["string", "comment"] },
|
||||
{ "open": "B\"", "close": "\"", "notIn": ["string", "comment"] },
|
||||
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
|
||||
{ "open": "r'", "close": "'", "notIn": ["string", "comment"] },
|
||||
{ "open": "R'", "close": "'", "notIn": ["string", "comment"] },
|
||||
{ "open": "u'", "close": "'", "notIn": ["string", "comment"] },
|
||||
{ "open": "U'", "close": "'", "notIn": ["string", "comment"] },
|
||||
{ "open": "f'", "close": "'", "notIn": ["string", "comment"] },
|
||||
{ "open": "F'", "close": "'", "notIn": ["string", "comment"] },
|
||||
{ "open": "b'", "close": "'", "notIn": ["string", "comment"] },
|
||||
{ "open": "B'", "close": "'", "notIn": ["string", "comment"] }
|
||||
],
|
||||
"surroundingPairs": [
|
||||
["{", "}"],
|
||||
|
||||
@@ -21,5 +21,11 @@
|
||||
["(", ")"],
|
||||
["\"", "\""],
|
||||
["'", "'"]
|
||||
]
|
||||
],
|
||||
"folding": {
|
||||
"markers": {
|
||||
"start": "^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/",
|
||||
"end": "^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@
|
||||
"onCommand:typescript.openTsServerLog",
|
||||
"onCommand:workbench.action.tasks.runTask"
|
||||
],
|
||||
"main": "./out/typescriptMain",
|
||||
"main": "./out/extension",
|
||||
"contributes": {
|
||||
"languages": [
|
||||
{
|
||||
@@ -483,23 +483,23 @@
|
||||
"commandPalette": [
|
||||
{
|
||||
"command": "typescript.reloadProjects",
|
||||
"when": "editorLangId == 'typescript'"
|
||||
"when": "editorLangId == typescript && typescript.isManagedFile"
|
||||
},
|
||||
{
|
||||
"command": "typescript.reloadProjects",
|
||||
"when": "editorLangId == typescriptreact"
|
||||
"when": "editorLangId == typescriptreact && typescript.isManagedFile"
|
||||
},
|
||||
{
|
||||
"command": "javascript.reloadProjects",
|
||||
"when": "editorLangId == 'javascript'"
|
||||
"when": "editorLangId == javascript && typescript.isManagedFile"
|
||||
},
|
||||
{
|
||||
"command": "javascript.reloadProjects",
|
||||
"when": "editorLangId == javascriptreact"
|
||||
"when": "editorLangId == javascriptreact && typescript.isManagedFile"
|
||||
},
|
||||
{
|
||||
"command": "typescript.goToProjectConfig",
|
||||
"when": "editorLangId == 'typescript'"
|
||||
"when": "editorLangId == typescript && typescript.isManagedFile"
|
||||
},
|
||||
{
|
||||
"command": "typescript.goToProjectConfig",
|
||||
@@ -507,11 +507,23 @@
|
||||
},
|
||||
{
|
||||
"command": "javascript.goToProjectConfig",
|
||||
"when": "editorLangId == 'javascript'"
|
||||
"when": "editorLangId == javascript && typescript.isManagedFile"
|
||||
},
|
||||
{
|
||||
"command": "javascript.goToProjectConfig",
|
||||
"when": "editorLangId == javascriptreact"
|
||||
"when": "editorLangId == javascriptreact && typescript.isManagedFile"
|
||||
},
|
||||
{
|
||||
"command": "typescript.selectTypeScriptVersion",
|
||||
"when": "typescript.isManagedFile"
|
||||
},
|
||||
{
|
||||
"command": "typescript.openTsServerLog",
|
||||
"when": "typescript.isManagedFile"
|
||||
},
|
||||
{
|
||||
"command": "typescript.restartTsServer",
|
||||
"when": "typescript.isManagedFile"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* 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';
|
||||
|
||||
import { TypeScriptServiceClientHost } from './typescriptMain';
|
||||
import { Command } from './utils/commandManager';
|
||||
import { Lazy } from './utils/lazy';
|
||||
|
||||
export class ReloadTypeScriptProjectsCommand implements Command {
|
||||
public readonly id = 'typescript.reloadProjects';
|
||||
|
||||
public constructor(
|
||||
private readonly lazyClientHost: Lazy<TypeScriptServiceClientHost>
|
||||
) { }
|
||||
|
||||
public execute() {
|
||||
this.lazyClientHost.value.reloadProjects();
|
||||
}
|
||||
}
|
||||
|
||||
export class ReloadJavaScriptProjectsCommand implements Command {
|
||||
public readonly id = 'javascript.reloadProjects';
|
||||
|
||||
public constructor(
|
||||
private readonly lazyClientHost: Lazy<TypeScriptServiceClientHost>
|
||||
) { }
|
||||
|
||||
public execute() {
|
||||
this.lazyClientHost.value.reloadProjects();
|
||||
}
|
||||
}
|
||||
|
||||
export class SelectTypeScriptVersionCommand implements Command {
|
||||
public readonly id = 'typescript.selectTypeScriptVersion';
|
||||
|
||||
public constructor(
|
||||
private readonly lazyClientHost: Lazy<TypeScriptServiceClientHost>
|
||||
) { }
|
||||
|
||||
public execute() {
|
||||
this.lazyClientHost.value.serviceClient.onVersionStatusClicked();
|
||||
}
|
||||
}
|
||||
|
||||
export class OpenTsServerLogCommand implements Command {
|
||||
public readonly id = 'typescript.openTsServerLog';
|
||||
|
||||
public constructor(
|
||||
private readonly lazyClientHost: Lazy<TypeScriptServiceClientHost>
|
||||
) { }
|
||||
|
||||
public execute() {
|
||||
this.lazyClientHost.value.serviceClient.openTsServerLogFile();
|
||||
}
|
||||
}
|
||||
|
||||
export class RestartTsServerCommand implements Command {
|
||||
public readonly id = 'typescript.restartTsServer';
|
||||
|
||||
public constructor(
|
||||
private readonly lazyClientHost: Lazy<TypeScriptServiceClientHost>
|
||||
) { }
|
||||
|
||||
public execute() {
|
||||
this.lazyClientHost.value.serviceClient.restartTsServer();
|
||||
}
|
||||
}
|
||||
|
||||
export class TypeScriptGoToProjectConfigCommand implements Command {
|
||||
public readonly id = 'typescript.goToProjectConfig';
|
||||
|
||||
public constructor(
|
||||
private readonly lazyClientHost: Lazy<TypeScriptServiceClientHost>,
|
||||
) { }
|
||||
|
||||
public execute() {
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
if (editor) {
|
||||
this.lazyClientHost.value.goToProjectConfig(true, editor.document.uri);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class JavaScriptGoToProjectConfigCommand implements Command {
|
||||
public readonly id = 'javascript.goToProjectConfig';
|
||||
|
||||
public constructor(
|
||||
private readonly lazyClientHost: Lazy<TypeScriptServiceClientHost>,
|
||||
) { }
|
||||
|
||||
public execute() {
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
if (editor) {
|
||||
this.lazyClientHost.value.goToProjectConfig(false, editor.document.uri);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* 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';
|
||||
import { CommandManager } from './utils/commandManager';
|
||||
import { TypeScriptServiceClientHost } from './typescriptMain';
|
||||
import * as commands from './commands';
|
||||
|
||||
import TypeScriptTaskProviderManager from './features/taskProvider';
|
||||
import { getContributedTypeScriptServerPlugins, TypeScriptServerPlugin } from './utils/plugins';
|
||||
import * as ProjectStatus from './utils/projectStatus';
|
||||
import * as languageModeIds from './utils/languageModeIds';
|
||||
import * as languageConfigurations from './utils/languageConfigurations';
|
||||
import { standardLanguageDescriptions } from './utils/languageDescription';
|
||||
import ManagedFileContextManager from './utils/managedFileContext';
|
||||
import { lazy, Lazy } from './utils/lazy';
|
||||
import TypeScriptServiceClient from './typescriptServiceClient';
|
||||
|
||||
export function activate(
|
||||
context: vscode.ExtensionContext
|
||||
): void {
|
||||
const plugins = getContributedTypeScriptServerPlugins();
|
||||
|
||||
const commandManager = new CommandManager();
|
||||
context.subscriptions.push(commandManager);
|
||||
|
||||
const lazyClientHost = createLazyClientHost(context, plugins, commandManager);
|
||||
|
||||
registerCommands(commandManager, lazyClientHost);
|
||||
context.subscriptions.push(new TypeScriptTaskProviderManager(lazyClientHost.map(x => x.serviceClient)));
|
||||
context.subscriptions.push(vscode.languages.setLanguageConfiguration(languageModeIds.jsxTags, languageConfigurations.jsxTags));
|
||||
|
||||
const supportedLanguage = [].concat.apply([], standardLanguageDescriptions.map(x => x.modeIds).concat(plugins.map(x => x.languages)));
|
||||
function didOpenTextDocument(textDocument: vscode.TextDocument): boolean {
|
||||
if (isSupportedDocument(supportedLanguage, textDocument)) {
|
||||
openListener.dispose();
|
||||
// Force activation
|
||||
// tslint:disable-next-line:no-unused-expression
|
||||
void lazyClientHost.value;
|
||||
|
||||
context.subscriptions.push(new ManagedFileContextManager(resource => {
|
||||
return lazyClientHost.value.serviceClient.normalizePath(resource);
|
||||
}));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
const openListener = vscode.workspace.onDidOpenTextDocument(didOpenTextDocument, undefined, context.subscriptions);
|
||||
for (const textDocument of vscode.workspace.textDocuments) {
|
||||
if (didOpenTextDocument(textDocument)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function createLazyClientHost(
|
||||
context: vscode.ExtensionContext,
|
||||
plugins: TypeScriptServerPlugin[],
|
||||
commandManager: CommandManager
|
||||
): Lazy<TypeScriptServiceClientHost> {
|
||||
return lazy(() => {
|
||||
const clientHost = new TypeScriptServiceClientHost(standardLanguageDescriptions, context.workspaceState, plugins, commandManager);
|
||||
context.subscriptions.push(clientHost);
|
||||
const host = clientHost;
|
||||
clientHost.serviceClient.onReady().then(() => {
|
||||
context.subscriptions.push(ProjectStatus.create(host.serviceClient, host.serviceClient.telemetryReporter, path => new Promise<boolean>(resolve => setTimeout(() => resolve(host.handles(path)), 750)), context.workspaceState));
|
||||
}, () => {
|
||||
// Nothing to do here. The client did show a message;
|
||||
});
|
||||
return clientHost;
|
||||
});
|
||||
}
|
||||
|
||||
function registerCommands(
|
||||
commandManager: CommandManager,
|
||||
lazyClientHost: Lazy<TypeScriptServiceClientHost>
|
||||
) {
|
||||
commandManager.register(new commands.ReloadTypeScriptProjectsCommand(lazyClientHost));
|
||||
commandManager.register(new commands.ReloadJavaScriptProjectsCommand(lazyClientHost));
|
||||
commandManager.register(new commands.SelectTypeScriptVersionCommand(lazyClientHost));
|
||||
commandManager.register(new commands.OpenTsServerLogCommand(lazyClientHost));
|
||||
commandManager.register(new commands.RestartTsServerCommand(lazyClientHost));
|
||||
commandManager.register(new commands.TypeScriptGoToProjectConfigCommand(lazyClientHost));
|
||||
commandManager.register(new commands.JavaScriptGoToProjectConfigCommand(lazyClientHost));
|
||||
}
|
||||
|
||||
|
||||
function isSupportedDocument(
|
||||
supportedLanguage: string[],
|
||||
document: vscode.TextDocument
|
||||
): boolean {
|
||||
if (supportedLanguage.indexOf(document.languageId) < 0) {
|
||||
return false;
|
||||
}
|
||||
const scheme = document.uri.scheme;
|
||||
return (
|
||||
scheme === TypeScriptServiceClient.WALK_THROUGH_SNIPPET_SCHEME
|
||||
|| scheme === 'untitled'
|
||||
|| scheme === 'file'
|
||||
);
|
||||
}
|
||||
@@ -378,13 +378,13 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP
|
||||
});
|
||||
}
|
||||
|
||||
private isValidFunctionCompletionContext(filepath: string, position: Position): Promise<boolean> {
|
||||
const args = vsPositionToTsFileLocation(filepath, position);
|
||||
private async isValidFunctionCompletionContext(filepath: string, position: Position): Promise<boolean> {
|
||||
// Workaround for https://github.com/Microsoft/TypeScript/issues/12677
|
||||
// Don't complete function calls inside of destructive assigments or imports
|
||||
return this.client.execute('quickinfo', args).then(infoResponse => {
|
||||
try {
|
||||
const infoResponse = await this.client.execute('quickinfo', vsPositionToTsFileLocation(filepath, position));
|
||||
const info = infoResponse.body;
|
||||
switch (info && info.kind as string) {
|
||||
switch (info && info.kind) {
|
||||
case 'var':
|
||||
case 'let':
|
||||
case 'const':
|
||||
@@ -393,35 +393,40 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}, () => {
|
||||
} catch (e) {
|
||||
return true;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private snippetForFunctionCall(detail: CompletionEntryDetails): SnippetString {
|
||||
const suggestionArgumentNames: string[] = [];
|
||||
let hasOptionalParemeters = false;
|
||||
let parenCount = 0;
|
||||
for (let i = 0; i < detail.displayParts.length; ++i) {
|
||||
let i = 0;
|
||||
for (; i < detail.displayParts.length; ++i) {
|
||||
const part = detail.displayParts[i];
|
||||
// Only take top level paren names
|
||||
if (part.kind === 'parameterName' && parenCount === 1) {
|
||||
suggestionArgumentNames.push(`\${${i + 1}:${part.text}}`);
|
||||
const next = detail.displayParts[i + 1];
|
||||
// Skip optional parameters
|
||||
const nameIsFollowedByOptionalIndicator = next && next.text === '?';
|
||||
if (!nameIsFollowedByOptionalIndicator) {
|
||||
suggestionArgumentNames.push(`\${${i + 1}:${part.text}}`);
|
||||
}
|
||||
hasOptionalParemeters = hasOptionalParemeters || nameIsFollowedByOptionalIndicator;
|
||||
} else if (part.kind === 'punctuation') {
|
||||
if (part.text === '(') {
|
||||
++parenCount;
|
||||
} else if (part.text === ')') {
|
||||
--parenCount;
|
||||
} else if (part.text === '...' && parenCount === 1) {
|
||||
// Found rest parmeter. Do not fill in any further arguments
|
||||
hasOptionalParemeters = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let codeSnippet = detail.name;
|
||||
if (suggestionArgumentNames.length > 0) {
|
||||
codeSnippet += '(' + suggestionArgumentNames.join(', ') + ')$0';
|
||||
} else {
|
||||
codeSnippet += '()';
|
||||
}
|
||||
|
||||
const codeSnippet = `${detail.name}(${suggestionArgumentNames.join(', ')}${hasOptionalParemeters ? '${' + i + '}' : ''})$0`;
|
||||
return new SnippetString(codeSnippet);
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ export class TypeScriptFormattingProvider implements DocumentRangeFormattingEdit
|
||||
if (!filepath) {
|
||||
return [];
|
||||
}
|
||||
let args: Proto.FormatOnKeyRequestArgs = {
|
||||
const args: Proto.FormatOnKeyRequestArgs = {
|
||||
file: filepath,
|
||||
line: position.line + 1,
|
||||
offset: position.character + 1,
|
||||
|
||||
@@ -15,6 +15,7 @@ import TsConfigProvider, { TSConfig } from '../utils/tsconfigProvider';
|
||||
import { isImplicitProjectConfigFile } from '../utils/tsconfig';
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
import { Lazy } from '../utils/lazy';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
type AutoDetect = 'on' | 'off' | 'build' | 'watch';
|
||||
@@ -42,7 +43,7 @@ class TscTaskProvider implements vscode.TaskProvider {
|
||||
private readonly disposables: vscode.Disposable[] = [];
|
||||
|
||||
public constructor(
|
||||
private readonly lazyClient: () => ITypeScriptServiceClient
|
||||
private readonly client: Lazy<ITypeScriptServiceClient>
|
||||
) {
|
||||
this.tsconfigProvider = new TsConfigProvider();
|
||||
|
||||
@@ -104,7 +105,7 @@ class TscTaskProvider implements vscode.TaskProvider {
|
||||
}
|
||||
|
||||
try {
|
||||
const res: Proto.ProjectInfoResponse = await this.lazyClient().execute(
|
||||
const res: Proto.ProjectInfoResponse = await this.client.value.execute(
|
||||
'projectInfo',
|
||||
{ file, needFileNameList: false },
|
||||
token);
|
||||
@@ -166,7 +167,7 @@ class TscTaskProvider implements vscode.TaskProvider {
|
||||
if (editor) {
|
||||
const document = editor.document;
|
||||
if (document && (document.languageId === 'typescript' || document.languageId === 'typescriptreact')) {
|
||||
return this.lazyClient().normalizePath(document.uri);
|
||||
return this.client.value.normalizePath(document.uri);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
@@ -235,14 +236,14 @@ class TscTaskProvider implements vscode.TaskProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* Manages registrations of TypeScript task provides with VScode.
|
||||
* Manages registrations of TypeScript task providers with VS Code.
|
||||
*/
|
||||
export default class TypeScriptTaskProviderManager {
|
||||
private taskProviderSub: vscode.Disposable | undefined = undefined;
|
||||
private readonly disposables: vscode.Disposable[] = [];
|
||||
|
||||
constructor(
|
||||
private readonly lazyClient: () => ITypeScriptServiceClient
|
||||
private readonly client: Lazy<ITypeScriptServiceClient>
|
||||
) {
|
||||
vscode.workspace.onDidChangeConfiguration(this.onConfigurationChanged, this, this.disposables);
|
||||
this.onConfigurationChanged();
|
||||
@@ -262,7 +263,7 @@ export default class TypeScriptTaskProviderManager {
|
||||
this.taskProviderSub.dispose();
|
||||
this.taskProviderSub = undefined;
|
||||
} else if (!this.taskProviderSub && autoDetect !== 'off') {
|
||||
this.taskProviderSub = vscode.workspace.registerTaskProvider('typescript', new TscTaskProvider(this.lazyClient));
|
||||
this.taskProviderSub = vscode.workspace.registerTaskProvider('typescript', new TscTaskProvider(this.client));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
* https://github.com/Microsoft/TypeScript-Sublime-Plugin/blob/master/TypeScript%20Indent.tmPreferences
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
|
||||
import { env, languages, commands, workspace, window, ExtensionContext, Memento, Diagnostic, Range, Disposable, Uri, MessageItem, DiagnosticSeverity, TextDocument } from 'vscode';
|
||||
import { env, languages, commands, workspace, window, Memento, Diagnostic, Range, Disposable, Uri, MessageItem, DiagnosticSeverity, TextDocument } from 'vscode';
|
||||
|
||||
// This must be the first statement otherwise modules might got loaded with
|
||||
// the wrong locale.
|
||||
@@ -25,188 +25,17 @@ import TypeScriptServiceClient from './typescriptServiceClient';
|
||||
import { ITypeScriptServiceClientHost } from './typescriptService';
|
||||
|
||||
import BufferSyncSupport from './features/bufferSyncSupport';
|
||||
import TypeScriptTaskProviderManager from './features/taskProvider';
|
||||
|
||||
import * as ProjectStatus from './utils/projectStatus';
|
||||
import TypingsStatus, { AtaProgressReporter } from './utils/typingsStatus';
|
||||
import VersionStatus from './utils/versionStatus';
|
||||
import { getContributedTypeScriptServerPlugins, TypeScriptServerPlugin } from './utils/plugins';
|
||||
import { TypeScriptServerPlugin } from './utils/plugins';
|
||||
import { openOrCreateConfigFile, isImplicitProjectConfigFile } from './utils/tsconfig';
|
||||
import { tsLocationToVsPosition } from './utils/convert';
|
||||
import FormattingConfigurationManager from './features/formattingConfigurationManager';
|
||||
import * as languageModeIds from './utils/languageModeIds';
|
||||
import * as languageConfigurations from './utils/languageConfigurations';
|
||||
import { CommandManager, Command } from './utils/commandManager';
|
||||
import { CommandManager } from './utils/commandManager';
|
||||
import DiagnosticsManager from './features/diagnostics';
|
||||
|
||||
interface LanguageDescription {
|
||||
id: string;
|
||||
diagnosticSource: string;
|
||||
modeIds: string[];
|
||||
configFile?: string;
|
||||
isExternal?: boolean;
|
||||
}
|
||||
|
||||
const standardLanguageDescriptions: LanguageDescription[] = [
|
||||
{
|
||||
id: 'typescript',
|
||||
diagnosticSource: 'ts',
|
||||
modeIds: [languageModeIds.typescript, languageModeIds.typescriptreact],
|
||||
configFile: 'tsconfig.json'
|
||||
}, {
|
||||
id: 'javascript',
|
||||
diagnosticSource: 'js',
|
||||
modeIds: [languageModeIds.javascript, languageModeIds.javascriptreact],
|
||||
configFile: 'jsconfig.json'
|
||||
}
|
||||
];
|
||||
|
||||
class ReloadTypeScriptProjectsCommand implements Command {
|
||||
public readonly id = 'typescript.reloadProjects';
|
||||
|
||||
public constructor(
|
||||
private readonly lazyClientHost: () => TypeScriptServiceClientHost
|
||||
) { }
|
||||
|
||||
public execute() {
|
||||
this.lazyClientHost().reloadProjects();
|
||||
}
|
||||
}
|
||||
|
||||
class ReloadJavaScriptProjectsCommand implements Command {
|
||||
public readonly id = 'javascript.reloadProjects';
|
||||
|
||||
public constructor(
|
||||
private readonly lazyClientHost: () => TypeScriptServiceClientHost
|
||||
) { }
|
||||
|
||||
public execute() {
|
||||
this.lazyClientHost().reloadProjects();
|
||||
}
|
||||
}
|
||||
|
||||
class SelectTypeScriptVersionCommand implements Command {
|
||||
public readonly id = 'typescript.selectTypeScriptVersion';
|
||||
|
||||
public constructor(
|
||||
private readonly lazyClientHost: () => TypeScriptServiceClientHost
|
||||
) { }
|
||||
|
||||
public execute() {
|
||||
this.lazyClientHost().serviceClient.onVersionStatusClicked();
|
||||
}
|
||||
}
|
||||
|
||||
class OpenTsServerLogCommand implements Command {
|
||||
public readonly id = 'typescript.openTsServerLog';
|
||||
|
||||
public constructor(
|
||||
private readonly lazyClientHost: () => TypeScriptServiceClientHost
|
||||
) { }
|
||||
|
||||
public execute() {
|
||||
this.lazyClientHost().serviceClient.openTsServerLogFile();
|
||||
}
|
||||
}
|
||||
|
||||
class RestartTsServerCommand implements Command {
|
||||
public readonly id = 'typescript.restartTsServer';
|
||||
|
||||
public constructor(
|
||||
private readonly lazyClientHost: () => TypeScriptServiceClientHost
|
||||
) { }
|
||||
|
||||
public execute() {
|
||||
this.lazyClientHost().serviceClient.restartTsServer();
|
||||
}
|
||||
}
|
||||
|
||||
class TypeScriptGoToProjectConfigCommand implements Command {
|
||||
public readonly id = 'typescript.goToProjectConfig';
|
||||
|
||||
public constructor(
|
||||
private readonly lazyClientHost: () => TypeScriptServiceClientHost,
|
||||
) { }
|
||||
|
||||
public execute() {
|
||||
const editor = window.activeTextEditor;
|
||||
if (editor) {
|
||||
this.lazyClientHost().goToProjectConfig(true, editor.document.uri);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class JavaScriptGoToProjectConfigCommand implements Command {
|
||||
public readonly id = 'javascript.goToProjectConfig';
|
||||
|
||||
public constructor(
|
||||
private readonly lazyClientHost: () => TypeScriptServiceClientHost,
|
||||
) { }
|
||||
|
||||
public execute() {
|
||||
const editor = window.activeTextEditor;
|
||||
if (editor) {
|
||||
this.lazyClientHost().goToProjectConfig(false, editor.document.uri);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function activate(context: ExtensionContext): void {
|
||||
const plugins = getContributedTypeScriptServerPlugins();
|
||||
|
||||
const commandManager = new CommandManager();
|
||||
context.subscriptions.push(commandManager);
|
||||
|
||||
const lazyClientHost = (() => {
|
||||
let clientHost: TypeScriptServiceClientHost | undefined;
|
||||
return () => {
|
||||
if (!clientHost) {
|
||||
clientHost = new TypeScriptServiceClientHost(standardLanguageDescriptions, context.workspaceState, plugins, commandManager);
|
||||
context.subscriptions.push(clientHost);
|
||||
|
||||
const host = clientHost;
|
||||
clientHost.serviceClient.onReady().then(() => {
|
||||
context.subscriptions.push(ProjectStatus.create(host.serviceClient, host.serviceClient.telemetryReporter,
|
||||
path => new Promise<boolean>(resolve => setTimeout(() => resolve(host.handles(path)), 750)),
|
||||
context.workspaceState));
|
||||
}, () => {
|
||||
// Nothing to do here. The client did show a message;
|
||||
});
|
||||
}
|
||||
return clientHost;
|
||||
};
|
||||
})();
|
||||
|
||||
commandManager.register(new ReloadTypeScriptProjectsCommand(lazyClientHost));
|
||||
commandManager.register(new ReloadJavaScriptProjectsCommand(lazyClientHost));
|
||||
commandManager.register(new SelectTypeScriptVersionCommand(lazyClientHost));
|
||||
commandManager.register(new OpenTsServerLogCommand(lazyClientHost));
|
||||
commandManager.register(new RestartTsServerCommand(lazyClientHost));
|
||||
commandManager.register(new TypeScriptGoToProjectConfigCommand(lazyClientHost));
|
||||
commandManager.register(new JavaScriptGoToProjectConfigCommand(lazyClientHost));
|
||||
|
||||
context.subscriptions.push(new TypeScriptTaskProviderManager(() => lazyClientHost().serviceClient));
|
||||
|
||||
context.subscriptions.push(languages.setLanguageConfiguration(languageModeIds.jsxTags, languageConfigurations.jsxTags));
|
||||
|
||||
const supportedLanguage = [].concat.apply([], standardLanguageDescriptions.map(x => x.modeIds).concat(plugins.map(x => x.languages)));
|
||||
function didOpenTextDocument(textDocument: TextDocument): boolean {
|
||||
if (supportedLanguage.indexOf(textDocument.languageId) >= 0) {
|
||||
openListener.dispose();
|
||||
// Force activation
|
||||
void lazyClientHost();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
const openListener = workspace.onDidOpenTextDocument(didOpenTextDocument);
|
||||
for (let textDocument of workspace.textDocuments) {
|
||||
if (didOpenTextDocument(textDocument)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
import { LanguageDescription } from './utils/languageDescription';
|
||||
|
||||
const validateSetting = 'validate.enable';
|
||||
|
||||
@@ -422,7 +251,7 @@ const styleCheckDiagnostics = [
|
||||
7030 // not all code paths return a value
|
||||
];
|
||||
|
||||
class TypeScriptServiceClientHost implements ITypeScriptServiceClientHost {
|
||||
export class TypeScriptServiceClientHost implements ITypeScriptServiceClientHost {
|
||||
private readonly ataProgressReporter: AtaProgressReporter;
|
||||
private readonly typingsStatus: TypingsStatus;
|
||||
private readonly client: TypeScriptServiceClient;
|
||||
@@ -453,12 +282,12 @@ class TypeScriptServiceClientHost implements ITypeScriptServiceClientHost {
|
||||
configFileWatcher.onDidDelete(handleProjectCreateOrDelete, this, this.disposables);
|
||||
configFileWatcher.onDidChange(handleProjectChange, this, this.disposables);
|
||||
|
||||
this.versionStatus = new VersionStatus();
|
||||
this.disposables.push(this.versionStatus);
|
||||
|
||||
this.client = new TypeScriptServiceClient(this, workspaceState, this.versionStatus, plugins);
|
||||
this.client = new TypeScriptServiceClient(this, workspaceState, version => this.versionStatus.onDidChangeTypeScriptVersion(version), plugins);
|
||||
this.disposables.push(this.client);
|
||||
|
||||
this.versionStatus = new VersionStatus(resource => this.client.normalizePath(resource));
|
||||
this.disposables.push(this.versionStatus);
|
||||
|
||||
this.typingsStatus = new TypingsStatus(this.client);
|
||||
this.ataProgressReporter = new AtaProgressReporter(this.client);
|
||||
|
||||
@@ -469,6 +298,7 @@ class TypeScriptServiceClientHost implements ITypeScriptServiceClientHost {
|
||||
this.languagePerId.set(description.id, manager);
|
||||
}
|
||||
|
||||
this.client.startService();
|
||||
this.client.onReady().then(() => {
|
||||
if (!this.client.apiVersion.has230Features()) {
|
||||
return;
|
||||
|
||||
@@ -17,7 +17,6 @@ import { ITypeScriptServiceClient, ITypeScriptServiceClientHost } from './typesc
|
||||
import { TypeScriptServerPlugin } from './utils/plugins';
|
||||
import Logger from './utils/logger';
|
||||
|
||||
import VersionStatus from './utils/versionStatus';
|
||||
import * as is from './utils/is';
|
||||
import TelemetryReporter from './utils/telemetry';
|
||||
import Tracer from './utils/tracer';
|
||||
@@ -108,7 +107,7 @@ class RequestQueue {
|
||||
}
|
||||
|
||||
export default class TypeScriptServiceClient implements ITypeScriptServiceClient {
|
||||
private static readonly WALK_THROUGH_SNIPPET_SCHEME = 'walkThroughSnippet';
|
||||
public static readonly WALK_THROUGH_SNIPPET_SCHEME = 'walkThroughSnippet';
|
||||
private static readonly WALK_THROUGH_SNIPPET_SCHEME_COLON = `${TypeScriptServiceClient.WALK_THROUGH_SNIPPET_SCHEME}:`;
|
||||
|
||||
private pathSeparator: string;
|
||||
@@ -153,7 +152,7 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient
|
||||
constructor(
|
||||
private readonly host: ITypeScriptServiceClientHost,
|
||||
private readonly workspaceState: Memento,
|
||||
private readonly versionStatus: VersionStatus,
|
||||
private readonly onDidChangeTypeScriptVersion: (version: TypeScriptVersion) => void,
|
||||
public readonly plugins: TypeScriptServerPlugin[]
|
||||
) {
|
||||
this.pathSeparator = path.sep;
|
||||
@@ -199,7 +198,6 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient
|
||||
}, this, this.disposables);
|
||||
this.telemetryReporter = new TelemetryReporter(() => this._tsserverVersion || this._apiVersion.versionString);
|
||||
this.disposables.push(this.telemetryReporter);
|
||||
this.startService();
|
||||
}
|
||||
|
||||
public get configuration() {
|
||||
@@ -301,7 +299,7 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient
|
||||
return Promise.reject<cp.ChildProcess>(new Error('Could not create TS service'));
|
||||
}
|
||||
|
||||
private startService(resendModels: boolean = false): Thenable<cp.ChildProcess> {
|
||||
public startService(resendModels: boolean = false): Thenable<cp.ChildProcess> {
|
||||
let currentVersion = this.versionPicker.currentVersion;
|
||||
|
||||
return this.servicePromise = new Promise<cp.ChildProcess>((resolve, reject) => {
|
||||
@@ -314,7 +312,7 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient
|
||||
}
|
||||
|
||||
this._apiVersion = this.versionPicker.currentVersion.version || API.defaultVersion;
|
||||
this.versionStatus.onDidChangeTypeScriptVersion(currentVersion);
|
||||
this.onDidChangeTypeScriptVersion(currentVersion);
|
||||
|
||||
this.requestQueue = new RequestQueue();
|
||||
this.callbacks = new CallbackMap();
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import * as languageModeIds from './languageModeIds';
|
||||
|
||||
export interface LanguageDescription {
|
||||
id: string;
|
||||
diagnosticSource: string;
|
||||
modeIds: string[];
|
||||
configFile?: string;
|
||||
isExternal?: boolean;
|
||||
}
|
||||
|
||||
export const standardLanguageDescriptions: LanguageDescription[] = [
|
||||
{
|
||||
id: 'typescript',
|
||||
diagnosticSource: 'ts',
|
||||
modeIds: [languageModeIds.typescript, languageModeIds.typescriptreact],
|
||||
configFile: 'tsconfig.json'
|
||||
}, {
|
||||
id: 'javascript',
|
||||
diagnosticSource: 'js',
|
||||
modeIds: [languageModeIds.javascript, languageModeIds.javascriptreact],
|
||||
configFile: 'jsconfig.json'
|
||||
}
|
||||
];
|
||||
@@ -0,0 +1,39 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
export interface Lazy<T> {
|
||||
value: T;
|
||||
hasValue: boolean;
|
||||
map<R>(f: (x: T) => R): Lazy<R>;
|
||||
}
|
||||
|
||||
class LazyValue<T> implements Lazy<T> {
|
||||
private _hasValue: boolean = false;
|
||||
private _value: T;
|
||||
|
||||
constructor(
|
||||
private readonly _getValue: () => T
|
||||
) { }
|
||||
|
||||
get value(): T {
|
||||
if (!this._hasValue) {
|
||||
this._hasValue = true;
|
||||
this._value = this._getValue();
|
||||
}
|
||||
return this._value;
|
||||
}
|
||||
|
||||
get hasValue(): boolean {
|
||||
return this._hasValue;
|
||||
}
|
||||
|
||||
public map<R>(f: (x: T) => R): Lazy<R> {
|
||||
return new LazyValue(() => f(this.value));
|
||||
}
|
||||
}
|
||||
|
||||
export function lazy<T>(getValue: () => T): Lazy<T> {
|
||||
return new LazyValue<T>(getValue);
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* 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';
|
||||
import * as languageModeIds from './languageModeIds';
|
||||
|
||||
/**
|
||||
* When clause context set when the current file is managed by vscode's built-in typescript extension.
|
||||
*/
|
||||
const isManagedFile_contextName = 'typescript.isManagedFile';
|
||||
|
||||
export default class ManagedFileContextManager {
|
||||
|
||||
private isInManagedFileContext: boolean = false;
|
||||
|
||||
private readonly onDidChangeActiveTextEditorSub: vscode.Disposable;
|
||||
|
||||
public constructor(
|
||||
private readonly normalizePath: (resource: vscode.Uri) => string | null
|
||||
) {
|
||||
this.onDidChangeActiveTextEditorSub = vscode.window.onDidChangeActiveTextEditor(this.onDidChangeActiveTextEditor, this);
|
||||
|
||||
this.onDidChangeActiveTextEditor(vscode.window.activeTextEditor);
|
||||
}
|
||||
|
||||
public dispose() {
|
||||
this.onDidChangeActiveTextEditorSub.dispose();
|
||||
}
|
||||
|
||||
private onDidChangeActiveTextEditor(editor?: vscode.TextEditor): any {
|
||||
if (editor) {
|
||||
const isManagedFile = isSupportedLanguageMode(editor.document) && this.normalizePath(editor.document.uri) !== null;
|
||||
this.updateContext(isManagedFile);
|
||||
}
|
||||
}
|
||||
|
||||
private updateContext(newValue: boolean) {
|
||||
if (newValue === this.isInManagedFileContext) {
|
||||
return;
|
||||
}
|
||||
|
||||
vscode.commands.executeCommand('setContext', isManagedFile_contextName, newValue);
|
||||
this.isInManagedFileContext = newValue;
|
||||
}
|
||||
}
|
||||
|
||||
function isSupportedLanguageMode(doc: vscode.TextDocument) {
|
||||
return vscode.languages.match([languageModeIds.typescript, languageModeIds.typescriptreact, languageModeIds.javascript, languageModeIds.javascriptreact], doc) > 0;
|
||||
}
|
||||
@@ -8,10 +8,12 @@ import { TypeScriptVersion } from './versionProvider';
|
||||
import * as languageModeIds from './languageModeIds';
|
||||
|
||||
export default class VersionStatus {
|
||||
private onChangeEditorSub: vscode.Disposable;
|
||||
private versionBarEntry: vscode.StatusBarItem;
|
||||
private readonly onChangeEditorSub: vscode.Disposable;
|
||||
private readonly versionBarEntry: vscode.StatusBarItem;
|
||||
|
||||
constructor() {
|
||||
constructor(
|
||||
private readonly normalizePath: (resource: vscode.Uri) => string | null
|
||||
) {
|
||||
this.versionBarEntry = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, Number.MIN_VALUE);
|
||||
this.onChangeEditorSub = vscode.window.onDidChangeActiveTextEditor(this.showHideStatus, this);
|
||||
}
|
||||
@@ -29,9 +31,6 @@ export default class VersionStatus {
|
||||
}
|
||||
|
||||
private showHideStatus() {
|
||||
if (!this.versionBarEntry) {
|
||||
return;
|
||||
}
|
||||
if (!vscode.window.activeTextEditor) {
|
||||
this.versionBarEntry.hide();
|
||||
return;
|
||||
@@ -39,13 +38,15 @@ export default class VersionStatus {
|
||||
|
||||
const doc = vscode.window.activeTextEditor.document;
|
||||
if (vscode.languages.match([languageModeIds.typescript, languageModeIds.typescriptreact], doc)) {
|
||||
this.versionBarEntry.show();
|
||||
return;
|
||||
if (this.normalizePath(doc.uri)) {
|
||||
this.versionBarEntry.show();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!vscode.window.activeTextEditor.viewColumn) {
|
||||
// viewColumn is undefined for the debug/output panel, but we still want
|
||||
// to show the version info
|
||||
// to show the version info in the existing editor
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -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/Microsoft/TypeScript-TmLanguage/commit/8361b1a232501c67911c81a4664a9460d7922c6b",
|
||||
"version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/9cdd3469119440f130fae342e0b1d843f98c6632",
|
||||
"name": "TypeScript",
|
||||
"scopeName": "source.ts",
|
||||
"fileTypes": [
|
||||
@@ -2141,7 +2141,7 @@
|
||||
"patterns": [
|
||||
{
|
||||
"name": "cast.expr.ts",
|
||||
"begin": "(?:(?<=return|throw|yield|await|default|[=(,:>*?]|[^+]\\+))\\s*(<)(?!<?\\=)",
|
||||
"begin": "(?:(?<=return|throw|yield|await|default|[=(,:>*?\\&\\|\\^]|[^_$[:alnum:]](?:\\+\\+|\\-\\-)|[^\\+]\\+|[^\\-]\\-))\\s*(<)(?!<?\\=)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "meta.brace.angle.ts"
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"yes": "是",
|
||||
"no": "否",
|
||||
"not now": "不是现在",
|
||||
"suggest auto fetch": "是否启用自动抓取 Git 存储库?"
|
||||
}
|
||||
@@ -59,6 +59,7 @@
|
||||
"provide tag name": "请提供标签名称",
|
||||
"tag message": "消息",
|
||||
"provide tag message": "请提供消息以对标签进行注释",
|
||||
"no remotes to fetch": "此存储库未配置可以从中抓取的远程存储库。",
|
||||
"no remotes to pull": "存储库未配置任何从其中进行拉取的远程存储库。",
|
||||
"pick remote pull repo": "选择要从其拉取分支的远程位置",
|
||||
"no remotes to push": "存储库未配置任何要推送到的远程存储库。",
|
||||
@@ -75,7 +76,7 @@
|
||||
"no stashes": "没有可以恢复的储藏。",
|
||||
"pick stash to pop": "选择要弹出的储藏",
|
||||
"clean repo": "在签出前,请清理存储库工作树。",
|
||||
"cant push": "无法推送 refs 到远端。请先运行“拉取”功能以整合你的更改。",
|
||||
"cant push": "无法推送 refs 到远端。您可以试着运行“拉取”功能,整合您的更改。",
|
||||
"git error details": "Git:{0}",
|
||||
"git error": "Git 错误",
|
||||
"open git log": "打开 GIT 日志"
|
||||
|
||||
@@ -6,8 +6,9 @@
|
||||
{
|
||||
"looking": "在 {0} 查找 Git 中",
|
||||
"using git": "使用 {1} 中的 GIT {0}",
|
||||
"notfound": "未找到 Git。你可以在 \"git.path\" 设置中配置其位置。",
|
||||
"updateGit": "更新 GIT",
|
||||
"downloadgit": "下载 Git",
|
||||
"neverShowAgain": "不再显示",
|
||||
"notfound": "未找到 Git。请安装 Git,或在 \"git.path\" 设置中配置。",
|
||||
"updateGit": "更新 GIT",
|
||||
"git20": "你似乎已安装 Git {0}。Code 和 Git 版本 >=2 一起工作最佳"
|
||||
}
|
||||
@@ -36,6 +36,7 @@
|
||||
"command.renameBranch": "重命名分支...",
|
||||
"command.merge": "合并分支...",
|
||||
"command.createTag": "创建标签",
|
||||
"command.fetch": "抓取",
|
||||
"command.pull": "拉取",
|
||||
"command.pullRebase": "拉取(变基)",
|
||||
"command.pullFrom": "拉取自...",
|
||||
@@ -60,6 +61,7 @@
|
||||
"config.countBadge": "控制 Git 徽章计数器。“all”计算所有更改。“tracked”只计算跟踪的更改。“off”关闭此功能。",
|
||||
"config.checkoutType": "控制运行“签出到...”命令时列出的分支的类型。\"all\" 显示所有 refs,\"local\" 只显示本地分支,\"tags\" 只显示标记,\"remote\" 只显示远程分支。",
|
||||
"config.ignoreLegacyWarning": "忽略旧版 Git 警告",
|
||||
"config.ignoreMissingGitWarning": "忽略“缺失 Git”警告",
|
||||
"config.ignoreLimitWarning": "忽略“存储库中存在大量更改”的警告",
|
||||
"config.defaultCloneDirectory": "克隆 Git 存储库的默认位置",
|
||||
"config.enableSmartCommit": "在没有暂存的更改时提交所有更改。",
|
||||
|
||||
@@ -11,5 +11,8 @@
|
||||
"disable.title": "禁用",
|
||||
"disable.description": "允许所有内容,执行所有脚本。不推荐",
|
||||
"moreInfo.title": "详细信息",
|
||||
"enableSecurityWarning.title": "在此工作区中启用预览安全警告",
|
||||
"disableSecurityWarning.title": "在此工作区中取消预览安全警告",
|
||||
"toggleSecurityWarning.description": "不影响内容安全等级",
|
||||
"preview.showPreviewSecuritySelector.title": "选择此工作区中 Markdown 预览的安全设置"
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"command.category": "合并冲突",
|
||||
"command.accept.all-current": "全部采用当前内容",
|
||||
"command.accept.all-incoming": "全部采用传入版本",
|
||||
"command.accept.all-both": "全部保留两者",
|
||||
"command.accept.current": "采用当前内容",
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"selectCodeAction": "选择要应用的代码操作",
|
||||
"acquiringTypingsLabel": "正在获取 typings...",
|
||||
"acquiringTypingsDetail": "获取 IntelliSense 的 typings 定义。",
|
||||
"autoImportLabel": "从 {0} 自动导入"
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"secondInstanceNoResponse": "{0} 的另一实例正在运行但没有响应",
|
||||
"secondInstanceNoResponseDetail": "请先关闭其他所有实例,然后重试。",
|
||||
"secondInstanceAdmin": "{0} 的第二个实例已经以管理员身份运行。",
|
||||
"secondInstanceAdminDetail": "请先关闭另一个实例,然后重试。",
|
||||
"close": "关闭(&&C)"
|
||||
}
|
||||
@@ -22,11 +22,11 @@
|
||||
"miQuit": "退出 {0}",
|
||||
"miNewFile": "新建文件(&&N)",
|
||||
"miOpen": "打开(&&O)...",
|
||||
"miOpenWorkspace": "打开工作区(&&K)…",
|
||||
"miOpenWorkspace": "打开工作区(&&K)...",
|
||||
"miOpenFolder": "打开文件夹(&&F)...",
|
||||
"miOpenFile": "打开文件(&&O)...",
|
||||
"miOpenRecent": "打开最近的文件(&&R)",
|
||||
"miSaveWorkspaceAs": "将工作区另存为(&&V)...",
|
||||
"miSaveWorkspaceAs": "将工作区另存为...",
|
||||
"miAddFolderToWorkspace": "将文件夹添加到工作区(&&D)...",
|
||||
"miSave": "保存(&&S)",
|
||||
"miSaveAs": "另存为(&&A)...",
|
||||
@@ -184,6 +184,7 @@
|
||||
"miDownloadingUpdate": "正在下载更新...",
|
||||
"miInstallingUpdate": "正在安装更新...",
|
||||
"miCheckForUpdates": "检查更新...",
|
||||
"aboutDetail": "\n版本 {0}\n提交 {1}\n日期 {2}\nShell {3}\n渲染器 {4}\nNode {5}\n架构 {6}",
|
||||
"okButton": "确定"
|
||||
"aboutDetail": "版本 {0}\n提交 {1}\n日期 {2}\nShell {3}\n渲染器 {4}\nNode {5}\n架构 {6}",
|
||||
"okButton": "确定",
|
||||
"copy": "复制(&&C)"
|
||||
}
|
||||
@@ -17,9 +17,9 @@
|
||||
"lineNumbers": "控制行号的显示。可选值为 \"on\"、\"off\" 和 \"relative\"。",
|
||||
"rulers": "在一定数量的等宽字符后显示垂直标尺。输入多个值,显示多个标尺。若数组为空,则不绘制标尺。",
|
||||
"wordSeparators": "执行文字相关的导航或操作时将用作文字分隔符的字符",
|
||||
"tabSize": "一个制表符等于的空格数。该设置在 `editor.detectIndentation` 启用时根据文件内容进行重写。",
|
||||
"tabSize": "一个制表符等于的空格数。该设置在 \"editor.detectIndentation\" 启用时根据文件内容可能会被覆盖。",
|
||||
"tabSize.errorMessage": "应为“number”。注意,值“auto”已由“editor.detectIndentation”设置替换。",
|
||||
"insertSpaces": "按 \"Tab\" 时插入空格。该设置在 `editor.detectIndentation` 启用时根据文件内容进行重写。",
|
||||
"insertSpaces": "按 Tab 键时插入空格。该设置在 \"editor.detectIndentation\" 启用时根据文件内容可能会被覆盖。",
|
||||
"insertSpaces.errorMessage": "应为 \"boolean\"。注意,值 \"auto\" 已由 \"editor.detectIndentation\" 设置替换。",
|
||||
"detectIndentation": "当打开文件时,将基于文件内容检测 \"editor.tabSize\" 和 \"editor.insertSpaces\"。",
|
||||
"roundedSelection": "控制选取范围是否有圆角",
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"unFoldRecursivelyAction.label": "以递归方式展开",
|
||||
"foldAction.label": "折叠",
|
||||
"foldRecursivelyAction.label": "以递归方式折叠",
|
||||
"foldAllBlockComments.label": "折叠所有块注释",
|
||||
"foldAllAction.label": "全部折叠",
|
||||
"unfoldAllAction.label": "全部展开",
|
||||
"foldLevelAction.label": "折叠级别 {0}"
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
"newWindow": "强制创建一个新的 Code 实例。",
|
||||
"performance": "通过启用 \"Developer: Startup Performance\" 命令开始。",
|
||||
"prof-startup": "启动期间运行 CPU 探查器",
|
||||
"inspect-extensions": "允许进行扩展的调试与分析。检查开发人员工具可获取连接 URI。",
|
||||
"inspect-brk-extensions": "允许在扩展主机在启动后暂停时进行扩展的调试与分析。检查开发人员工具可获取连接 URI。",
|
||||
"reuseWindow": "在上一活动窗口中强制打开文件或文件夹。",
|
||||
"userDataDir": "指定存放用户数据的目录。此目录在以 root 身份运行时十分有用。",
|
||||
"verbose": "打印详细输出(隐含 --wait 参数)。",
|
||||
@@ -24,6 +26,7 @@
|
||||
"experimentalApis": "启用扩展程序实验性 api 功能。",
|
||||
"disableExtensions": "禁用所有已安装的扩展。",
|
||||
"disableGPU": "禁用 GPU 硬件加速。",
|
||||
"ps": "打印进程使用情况和诊断信息。",
|
||||
"version": "打印版本。",
|
||||
"help": "打印使用情况。",
|
||||
"usage": "使用情况",
|
||||
|
||||
@@ -4,6 +4,5 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"notFound": "找不到扩展",
|
||||
"noCompatible": "找不到与此版本 Code 兼容的 {0} 版本。"
|
||||
"notCompatibleDownload": "无法下载。找不到与 VS Code 当前版本 ({0}) 兼容的扩展。"
|
||||
}
|
||||
+7
-2
@@ -6,11 +6,16 @@
|
||||
{
|
||||
"invalidManifest": "扩展无效: package.json 不是 JSON 文件。",
|
||||
"restartCodeLocal": "请先重启 Code 再重新安装 {0}。",
|
||||
"restartCodeGallery": "请先重启 Code 再重新安装。",
|
||||
"installingOutdatedExtension": "您已安装此扩展的新版程序。是否要使用旧版覆盖?",
|
||||
"override": "覆盖",
|
||||
"cancel": "取消",
|
||||
"notFoundCopatible": "无法安装。找不到与 VS Code 当前版本 ({1}) 兼容的扩展“{0}”。",
|
||||
"quitCode": "无法安装,因为此扩展的一个过时实例仍在运行。请先完全重启 VS Code,再重新安装。",
|
||||
"exitCode": "无法安装,因为此扩展的一个过时实例仍在运行。请先完全重启 VS Code,再重新安装。",
|
||||
"notFoundCompatibleDependency": "无法安装。找不到与 VS Code 当前版本 ({1}) 兼容的依赖扩展“{0}”。",
|
||||
"uninstallDependeciesConfirmation": "要仅卸载“{0}”或者其依赖项也一起卸载?",
|
||||
"uninstallOnly": "仅",
|
||||
"uninstallAll": "全部",
|
||||
"cancel": "取消",
|
||||
"uninstallConfirmation": "是否确定要卸载“{0}”?",
|
||||
"ok": "确定",
|
||||
"singleDependentError": "无法卸载扩展程序“{0}”。扩展程序“{1}”依赖于此。",
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"largeNumberBadge": "1万+",
|
||||
"badgeTitle": "{0} - {1}",
|
||||
"additionalViews": "其他视图",
|
||||
"numberBadge": "{0} ({1})",
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
"openPreviousEditor": "打开上一个编辑器",
|
||||
"nextEditorInGroup": "打开组中的下一个编辑器",
|
||||
"openPreviousEditorInGroup": "打开组中上一个编辑器",
|
||||
"lastEditorInGroup": "打开组中上一个编辑器",
|
||||
"navigateNext": "前进",
|
||||
"navigatePrevious": "后退",
|
||||
"navigateLast": "转到最后",
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"workbench.editor.labelFormat.long": "在文件的绝对路径之后显示文件名。",
|
||||
"tabDescription": "控制编辑器标签的格式。修改这项设置会让文件的路径更容易理解:\n- short: \"parent\"\n- medium: \"workspace/src/parent\"\n- long: \"/home/user/workspace/src/parent\"\n- default: 当与另一选项卡标题相同时为 \".../parent\"。选项卡被禁用时则为相对工作区路径",
|
||||
"editorTabCloseButton": "控制编辑器的选项卡关闭按钮的位置,或当设置为 \"off\" 时禁用关闭它们。",
|
||||
"tabSizing": "控制编辑器选项卡的大小。若设置为 \"fit\",选项卡将总是足够大,能够完全显示编辑器标签。若设置为 \"shrink\",将在不能一次全部显示所有选项卡时,允许选项卡缩小。",
|
||||
"showIcons": "控制打开的编辑器是否随图标一起显示。这还需启用图标主题。",
|
||||
"enablePreview": "控制是否将打开的编辑器显示为预览。预览编辑器将会重用至其被保留(例如,通过双击或编辑),且其字体样式将为斜体。",
|
||||
"enablePreviewFromQuickOpen": "控制 Quick Open 中打开的编辑器是否显示为预览。预览编辑器可以重新使用,直到将其保留(例如,通过双击或编辑)。",
|
||||
@@ -26,12 +27,10 @@
|
||||
"closeOnFocusLost": "控制 Quick Open 是否应在失去焦点时自动关闭。",
|
||||
"openDefaultSettings": "控制打开设置时是否打开显示所有默认设置的编辑器。",
|
||||
"sideBarLocation": "控制边栏的位置。它可显示在工作台的左侧或右侧。",
|
||||
"panelLocation": "控制面板的位置。它可显示在工作台的底部或右侧。",
|
||||
"statusBarVisibility": "控制工作台底部状态栏的可见性。",
|
||||
"activityBarVisibility": "控制工作台中活动栏的可见性。",
|
||||
"closeOnFileDelete": "控制文件被其他某些进程删除或重命名时是否应该自动关闭显示文件的编辑器。禁用此项会保持编辑器作为此类事件的脏文件打开。请注意,从应用程序内部进行删除操作会始终关闭编辑器,并且脏文件始终不会关闭以保存数据。",
|
||||
"experimentalFuzzySearchEndpoint": "表示用于实验性设置搜索的端点。",
|
||||
"experimentalFuzzySearchKey": "表示用于实验性设置搜索的密钥。",
|
||||
"enableNaturalLanguageSettingsSearch": "控制是否在设置中启用自然语言搜索模式。",
|
||||
"fontAliasing": "控制工作台中字体的渲染方式\n- default: 次像素平滑字体。将在大多数非 retina 显示器上显示最清晰的文字\n- antialiased: 进行像素而不是次像素级别的字体平滑。可能会导致字体整体显示得更细\n- none: 禁用字体平滑。将显示边缘粗糙、有锯齿的文字",
|
||||
"workbench.fontAliasing.default": "次像素平滑字体。将在大多数非 retina 显示器上显示最清晰的文字。",
|
||||
"workbench.fontAliasing.antialiased": "进行像素而不是次像素级别的字体平滑。可能会导致字体整体显示得更细。",
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"functionBreakpointsNotSupported": "此调试类型不支持函数断点",
|
||||
"functionBreakpointPlaceholder": "要断开的函数",
|
||||
"functionBreakPointInputAriaLabel": "键入函数断点"
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"callstackSection": "调用堆栈部分",
|
||||
"debugStopped": "因 {0} 已暂停",
|
||||
"callStackAriaLabel": "调试调用堆栈",
|
||||
"process": "进程",
|
||||
"paused": "已暂停",
|
||||
"running": "正在运行",
|
||||
"thread": "线程",
|
||||
"pausedOn": "因 {0} 已暂停",
|
||||
"loadMoreStackFrames": "加载多个堆栈帧",
|
||||
"threadAriaLabel": "线程 {0},调用堆栈,调试",
|
||||
"stackFrameAriaLabel": "堆栈帧 {0} 行 {1} {2},调用堆栈,调试"
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"variablesSection": "变量部分",
|
||||
"variablesAriaTreeLabel": "调试变量",
|
||||
"variableValueAriaLabel": "键入新的变量值",
|
||||
"variableScopeAriaLabel": "范围 {0},变量,调试",
|
||||
"variableAriaLabel": "{0} 值 {1},变量,调试"
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"expressionsSection": "表达式部分",
|
||||
"watchAriaTreeLabel": "调试监视表达式",
|
||||
"watchExpressionPlaceholder": "要监视的表达式",
|
||||
"watchExpressionInputAriaLabel": "键入监视表达式",
|
||||
"watchExpressionAriaLabel": "{0} 值 {1},监视,调试",
|
||||
"watchVariableAriaLabel": "{0} 值 {1},监视,调试"
|
||||
}
|
||||
@@ -10,16 +10,12 @@
|
||||
"Uninstalling": "正在卸载",
|
||||
"updateAction": "更新",
|
||||
"updateTo": "更新到 {0}",
|
||||
"enableForWorkspaceAction.label": "启用(工作区)",
|
||||
"enableAlwaysAction.label": "启用(始终)",
|
||||
"disableForWorkspaceAction.label": "禁用(工作区)",
|
||||
"disableAlwaysAction.label": "禁用(始终)",
|
||||
"ManageExtensionAction.uninstallingTooltip": "正在卸载",
|
||||
"enableForWorkspaceAction": "工作区",
|
||||
"enableGloballyAction": "始终",
|
||||
"enableForWorkspaceAction": "启用(工作区)",
|
||||
"enableGloballyAction": "启用",
|
||||
"enableAction": "启用",
|
||||
"disableForWorkspaceAction": "工作区",
|
||||
"disableGloballyAction": "始终",
|
||||
"disableForWorkspaceAction": "禁用(工作区)",
|
||||
"disableGloballyAction": "禁用",
|
||||
"disableAction": "禁用",
|
||||
"checkForUpdates": "检查更新",
|
||||
"enableAutoUpdate": "启用自动更新扩展",
|
||||
@@ -47,11 +43,8 @@
|
||||
"allExtensionsInstalled": "已安装根据工作区推荐的所有扩展",
|
||||
"installRecommendedExtension": "安装推荐的扩展",
|
||||
"extensionInstalled": "您已经安装过此推荐扩展",
|
||||
"showRecommendedKeymapExtensions": "显示推荐键映射",
|
||||
"showRecommendedKeymapExtensionsShort": "键映射",
|
||||
"showLanguageExtensions": "显示语言扩展",
|
||||
"showLanguageExtensionsShort": "语言扩展",
|
||||
"showAzureExtensions": "显示 Azure 扩展",
|
||||
"showAzureExtensionsShort": "Azure 扩展",
|
||||
"OpenExtensionsFile.failed": "无法在 \".vscode\" 文件夹({0})内创建 \"extensions.json\" 文件。",
|
||||
"configureWorkspaceRecommendedExtensions": "配置建议的扩展(工作区)",
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"folders": "文件夹"
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"filesCategory": "文件",
|
||||
"revealInSideBar": "在侧边栏中显示",
|
||||
"acceptLocalChanges": "使用你的更改并覆盖磁盘上的内容。",
|
||||
"revertLocalChanges": "放弃你的更改并还原为磁盘上的内容"
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"retry": "重试",
|
||||
"rename": "重命名",
|
||||
"newFile": "新建文件",
|
||||
"newFolder": "新建文件夹",
|
||||
"openFolderFirst": "先打开一个文件夹,以在其中创建文件或文件夹。",
|
||||
"newUntitledFile": "新的无标题文件",
|
||||
"createNewFile": "新建文件",
|
||||
"createNewFolder": "新建文件夹",
|
||||
"deleteButtonLabelRecycleBin": "移动到回收站(&&M)",
|
||||
"deleteButtonLabelTrash": "移动到回收站(&&M)",
|
||||
"deleteButtonLabel": "删除(&&D)",
|
||||
"dirtyMessageFolderOneDelete": "你正在删除的文件夹有 1 个文件具有未保存的更改。是否继续?",
|
||||
"dirtyMessageFolderDelete": "你正在删除的文件夹有 {0} 个文件具有未保存的更改。是否继续?",
|
||||
"dirtyMessageFileDelete": "你正在删除的文件具有未保存的更改。是否继续?",
|
||||
"dirtyWarning": "如果不保存,更改将丢失。",
|
||||
"confirmMoveTrashMessageFolder": "是否确实要删除“{0}”及其内容?",
|
||||
"confirmMoveTrashMessageFile": "是否确实要删除“{0}”?",
|
||||
"undoBin": "可以从回收站还原。",
|
||||
"undoTrash": "可以从回收站还原。",
|
||||
"doNotAskAgain": "不再询问",
|
||||
"confirmDeleteMessageFolder": "是否确定要永久删除“{0}”及其内容?",
|
||||
"confirmDeleteMessageFile": "是否确定要永久删除“{0}”?",
|
||||
"irreversible": "此操作不可逆!",
|
||||
"permDelete": "永久删除",
|
||||
"delete": "删除",
|
||||
"importFiles": "导入文件",
|
||||
"confirmOverwrite": "目标文件夹中已存在具有相同名称的文件或文件夹。是否要替换它?",
|
||||
"replaceButtonLabel": "替换(&&R)",
|
||||
"copyFile": "复制",
|
||||
"pasteFile": "粘贴",
|
||||
"duplicateFile": "重复",
|
||||
"openToSide": "打开到侧边",
|
||||
"compareSource": "选择以进行比较",
|
||||
"globalCompareFile": "比较活动文件与...",
|
||||
"openFileToCompare": "首先打开文件以将其与另外一个文件比较。",
|
||||
"compareWith": "将“{0}”与“{1}”比较",
|
||||
"compareFiles": "比较文件",
|
||||
"refresh": "刷新",
|
||||
"save": "保存",
|
||||
"saveAs": "另存为...",
|
||||
"saveAll": "全部保存",
|
||||
"saveAllInGroup": "保存组中的全部内容",
|
||||
"saveFiles": "保存所有文件",
|
||||
"revert": "还原文件",
|
||||
"focusOpenEditors": "专注于“打开的编辑器”视图",
|
||||
"focusFilesExplorer": "关注文件资源浏览器",
|
||||
"showInExplorer": "在侧边栏中显示活动文件",
|
||||
"openFileToShow": "请先打开要在浏览器中显示的文件",
|
||||
"collapseExplorerFolders": "在资源管理器中折叠文件夹",
|
||||
"refreshExplorer": "刷新资源管理器",
|
||||
"openFileInNewWindow": "在新窗口中打开活动文件",
|
||||
"openFileToShowInNewWindow": "请先打开要在新窗口中打开的文件",
|
||||
"revealInWindows": "在资源管理器中显示",
|
||||
"revealInMac": "在 Finder 中显示",
|
||||
"openContainer": "打开所在的文件夹",
|
||||
"revealActiveFileInWindows": "Windows 资源管理器中显示活动文件",
|
||||
"revealActiveFileInMac": "在 Finder 中显示活动文件",
|
||||
"openActiveFileContainer": "打开活动文件所在的文件夹",
|
||||
"copyPath": "复制路径",
|
||||
"copyPathOfActive": "复制活动文件的路径",
|
||||
"emptyFileNameError": "必须提供文件或文件夹名。",
|
||||
"fileNameExistsError": "此位置已存在文件或文件夹 **{0}**。请选择其他名称。",
|
||||
"invalidFileNameError": "名称 **{0}** 作为文件或文件夹名无效。请选择其他名称。",
|
||||
"filePathTooLongError": "名称 **{0}** 导致路径太长。请选择更短的名称。",
|
||||
"compareWithSaved": "比较活动与已保存的文件",
|
||||
"modifiedLabel": "{0} (磁盘上) ↔ {1}",
|
||||
"compareWithClipboard": "比较活动文件与剪贴板",
|
||||
"clipboardComparisonLabel": "剪贴板 ↔ {0}"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"openFileToCopy": "首先打开文件以复制其路径",
|
||||
"openFileToReveal": "首先打开文件以展现"
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"showExplorerViewlet": "显示资源管理器",
|
||||
"explore": "资源管理器",
|
||||
"view": "查看",
|
||||
"textFileEditor": "文本文件编辑器",
|
||||
"binaryFileEditor": "二进制文件编辑器",
|
||||
"filesConfigurationTitle": "文件",
|
||||
"exclude": "配置 glob 模式以在搜索中排除文件和文件夹。例如,文件资源管理器根据此设置决定文件或文件夹的显示和隐藏。",
|
||||
"files.exclude.boolean": "匹配文件路径所依据的 glob 模式。设置为 true 或 false 可启用或禁用该模式。",
|
||||
"files.exclude.when": "对匹配文件的同级文件的其他检查。使用 $(basename) 作为匹配文件名的变量。",
|
||||
"associations": "配置语言的文件关联(如: \"*.extension\": \"html\")。这些关联的优先级高于已安装语言的默认关联。",
|
||||
"encoding": "读取和编写文件时使用的默认字符集编码。也可以根据语言配置此设置。",
|
||||
"autoGuessEncoding": "如果启用,会在打开文件时尝试猜测字符集编码。也可以根据语言配置此设置。",
|
||||
"eol": "默认行尾字符。使用 \\n 表示 LF,\\r\\n 表示 CRLF。",
|
||||
"trimTrailingWhitespace": "启用后,将在保存文件时剪裁尾随空格。",
|
||||
"insertFinalNewline": "启用后,保存文件时在文件末尾插入一个最终新行。",
|
||||
"trimFinalNewlines": "启用后,保存文件时将删除在最终新行后的所有新行。",
|
||||
"files.autoSave.off": "永不自动保存更新后的文件。",
|
||||
"files.autoSave.afterDelay": "配置 \"files.autoSaveDelay\" 后自动保存更新后的文件。",
|
||||
"files.autoSave.onFocusChange": "编辑器失去焦点时自动保存更新后的文件。",
|
||||
"files.autoSave.onWindowChange": "窗口失去焦点时自动保存更新后的文件。",
|
||||
"autoSave": "控制已更新文件的自动保存。接受的值:“{0}”、\"{1}”、“{2}”(编辑器失去焦点)、“{3}”(窗口失去焦点)。如果设置为“{4}”,则可在 \"files.autoSaveDelay\" 中配置延迟。",
|
||||
"autoSaveDelay": "控制在多少毫秒后自动保存更改过的文件。仅在“files.autoSave”设置为“{0}”时适用。",
|
||||
"watcherExclude": "配置文件路径的 glob 模式以从文件监视排除。模式必须在绝对路径上匹配(例如 ** 前缀或完整路径需正确匹配)。更改此设置需要重启。如果在启动时遇到 Code 消耗大量 CPU 时间,则可以排除大型文件夹以减少初始加载。",
|
||||
"hotExit.off": "禁用热退出。",
|
||||
"hotExit.onExit": "应用程序关闭时将触发热退出。在 Windows/Linux 上关闭最后一个窗口或触发 workbench.action.quit 命令(命令托盘、键绑定、菜单)会引起应用程序关闭。下次启动时将还原所有已备份的窗口。",
|
||||
"hotExit.onExitAndWindowClose": "应用程序关闭时将触发热退出。在 Windows/Linux 上关闭最后一个窗口、触发 workbench.action.quit 命令(命令托盘、键绑定、菜单)会引起应用程序关闭。对于任何有文件夹打开的窗口,则不论该窗口是否是最后一个窗口。下次启动时将还原所有未打开文件夹的窗口。若要还原打开有文件夹的窗口,请将“window.restoreWindows”设置为“all”。",
|
||||
"hotExit": "控制是否在会话间记住未保存的文件,以允许在退出编辑器时跳过保存提示。",
|
||||
"useExperimentalFileWatcher": "使用新的试验文件观察程序。",
|
||||
"defaultLanguage": "分配给新文件的默认语言模式。",
|
||||
"editorConfigurationTitle": "编辑器",
|
||||
"formatOnSave": "保存时设置文件的格式。格式化程序必须可用,不能自动保存文件,并且不能关闭编辑器。",
|
||||
"explorerConfigurationTitle": "文件资源管理器",
|
||||
"openEditorsVisible": "在“打开的编辑器”窗格中显示的编辑器数量。将其设置为 0 可隐藏窗格。",
|
||||
"dynamicHeight": "控制打开的编辑器部分的高度是否应动态适应元素数量。",
|
||||
"autoReveal": "控制资源管理器是否应在打开文件时自动显示并选择它们。",
|
||||
"enableDragAndDrop": "控制资源管理器是否应该允许通过拖放移动文件和文件夹。",
|
||||
"confirmDragAndDrop": "控制在资源管理器内拖放移动文件或文件夹时是否进行确认。",
|
||||
"confirmDelete": "控制资源管理器是否应在删除文件到回收站时进行确认。",
|
||||
"sortOrder.default": "按名称的字母顺序排列文件和文件夹。文件夹显示在文件前。",
|
||||
"sortOrder.mixed": "按名称的字母顺序排列文件和文件夹。两者穿插显示。",
|
||||
"sortOrder.filesFirst": "按名称的字母顺序排列文件和文件夹。文件显示在文件夹前。",
|
||||
"sortOrder.type": "按扩展名的字母顺序排列文件和文件夹。文件夹显示在文件前。",
|
||||
"sortOrder.modified": "按最后修改日期降序排列文件和文件夹。文件夹显示在文件前。",
|
||||
"sortOrder": "控制资源管理器文件和文件夹的排列顺序。除了默认排列顺序,你也可以设置为 \"mixed\" (文件和文件夹一起排序)、\"type\" (按文件类型排)、\"modified\" (按最后修改日期排)或是 \"filesFirst\" (将文件排在文件夹前)。",
|
||||
"explorer.decorations.colors": "控制文件修饰是否用颜色。",
|
||||
"explorer.decorations.badges": "控制文件修饰是否用徽章。"
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"userGuide": "使用右侧编辑器工具栏的操作来**撤消**你的更改或用你的更改来**覆盖**磁盘上的内容",
|
||||
"discard": "放弃",
|
||||
"overwrite": "覆盖",
|
||||
"retry": "重试",
|
||||
"readonlySaveError": "无法保存“{0}”: 文件写保护。选择“覆盖”以删除保护。 ",
|
||||
"genericSaveError": "未能保存“{0}”: {1}",
|
||||
"staleSaveError": "无法保存“{0}”: 磁盘上的内容较新。单击 **比较** 以比较你的版本和磁盘上的版本。",
|
||||
"compareChanges": "比较",
|
||||
"saveConflictDiffLabel": "{0} (on disk) ↔ {1} (in {2}) - 解决保存的冲突"
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"noWorkspace": "无打开的文件夹",
|
||||
"explorerSection": "文件资源管理器部分",
|
||||
"noWorkspaceHelp": "你还没有在工作区中添加文件夹。",
|
||||
"addFolder": "添加文件夹",
|
||||
"noFolderHelp": "尚未打开文件夹。",
|
||||
"openFolder": "打开文件夹"
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"label": "资源管理器",
|
||||
"canNotResolve": "无法解析工作区文件夹"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"explorerSection": "文件资源管理器部分",
|
||||
"treeAriaLabel": "文件资源管理器"
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"fileInputAriaLabel": "键入文件名。按 Enter 以确认或按 Esc 以取消。",
|
||||
"filesExplorerViewerAriaLabel": "{0},文件资源管理器",
|
||||
"dropFolders": "你是否要将文件夹添加到工作区?",
|
||||
"dropFolder": "你是否要将文件夹添加到工作区?",
|
||||
"addFolders": "添加文件夹(&&A)",
|
||||
"addFolder": "添加文件夹(&&A)",
|
||||
"confirmMove": "是否确实要移动“{0}”?",
|
||||
"doNotAskAgain": "不再询问",
|
||||
"moveButtonLabel": "移动(&&M)",
|
||||
"confirmOverwriteMessage": "目标文件夹中已存在“{0}”。是否要将其替换?",
|
||||
"irreversible": "此操作不可逆!",
|
||||
"replaceButtonLabel": "替换(&&R)"
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"openEditors": "打开的编辑器",
|
||||
"openEditosrSection": "打开的编辑器部分",
|
||||
"treeAriaLabel": "打开的编辑器: 活动文件列表",
|
||||
"dirtyCounter": "{0} 个未保存"
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"editorGroupAriaLabel": "{0}, 编辑器组",
|
||||
"openEditorAriaLabel": "{0}, 打开编辑器",
|
||||
"saveAll": "全部保存",
|
||||
"closeAllUnmodified": "关闭未更改",
|
||||
"closeAll": "全部关闭",
|
||||
"compareWithSaved": "与已保存文件比较",
|
||||
"close": "关闭",
|
||||
"closeOthers": "关闭其他"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"totalProblems": "总计 {0} 个问题",
|
||||
"filteredProblems": "显示 {0} 个 (共 {1} 个) 问题"
|
||||
}
|
||||
@@ -7,7 +7,6 @@
|
||||
"viewCategory": "查看",
|
||||
"problems.view.toggle.label": "切换显示问题视图",
|
||||
"problems.view.focus.label": "聚焦于问题视图",
|
||||
"problems.view.hide.label": "隐藏问题视图",
|
||||
"problems.panel.configuration.title": "问题预览",
|
||||
"problems.panel.configuration.autoreveal": "控制问题预览是否应在打开文件时自动显示它们。",
|
||||
"markers.panel.title.problems": "问题",
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"defineKeybinding.initial": "按所需的键组合,然后按 Enter。按 Esc 可取消。",
|
||||
"defineKeybinding.initial": "先按所需的组合键,再按 Enter 键。",
|
||||
"defineKeybinding.chordsTo": "加上"
|
||||
}
|
||||
@@ -26,6 +26,7 @@
|
||||
"editKeybindingLabel": "更改键绑定",
|
||||
"addKeybindingLabelWithKey": "添加键绑定",
|
||||
"addKeybindingLabel": "添加键绑定",
|
||||
"title": "{0} ({1})",
|
||||
"commandAriaLabel": "命令为 {0}。",
|
||||
"keybindingAriaLabel": "键绑定为 {0}。",
|
||||
"noKeybinding": "未分配键绑定。",
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"openRawDefaultSettings": "打开默认设置原始文档",
|
||||
"openGlobalSettings": "打开用户设置",
|
||||
"openGlobalKeybindings": "打开键盘快捷方式",
|
||||
"openGlobalKeybindingsFile": "打开键盘快捷方式文件",
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
"oneSettingFound": "1 个设置匹配",
|
||||
"settingsFound": "{0} 个设置匹配",
|
||||
"totalSettingsMessage": "总计 {0} 个设置",
|
||||
"defaultSettings": "默认设置",
|
||||
"defaultFolderSettings": "默认文件夹设置",
|
||||
"defaultEditorReadonly": "在右侧编辑器中编辑以覆盖默认值。",
|
||||
"preferencesAriaLabel": "默认首选项。只读文本编辑器。"
|
||||
}
|
||||
@@ -7,8 +7,6 @@
|
||||
"emptyUserSettingsHeader": "将设置放入此处以覆盖\"默认设置\"。",
|
||||
"emptyWorkspaceSettingsHeader": "将设置放入此处以覆盖\"用户设置\"。",
|
||||
"emptyFolderSettingsHeader": "将文件夹设置放入此处以覆盖\"工作区设置\"。",
|
||||
"defaultFolderSettingsTitle": "默认文件夹设置",
|
||||
"defaultSettingsTitle": "默认设置",
|
||||
"editTtile": "编辑",
|
||||
"replaceDefaultValue": "在设置中替换",
|
||||
"copyDefaultValue": "复制到设置",
|
||||
|
||||
@@ -4,9 +4,12 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"defaultSettingsFuzzyPrompt": "试试模糊搜索!",
|
||||
"defaultSettingsFuzzyPrompt": "试试自然语言搜索!",
|
||||
"defaultSettings": "将您的设置放入右侧编辑器以覆盖。",
|
||||
"noSettingsFound": "未找到设置。",
|
||||
"folderSettingsDetails": "文件夹设置",
|
||||
"enableFuzzySearch": "启用实验性的模糊搜索"
|
||||
"settingsSwitcherBarAriaLabel": "设置转换器",
|
||||
"userSettings": "用户设置",
|
||||
"workspaceSettings": "工作区设置",
|
||||
"folderSettings": "文件夹设置",
|
||||
"enableFuzzySearch": "启用自然语言搜索"
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"defaultPreferencesEditor": "默认首选项编辑器",
|
||||
"keybindingsEditor": "键绑定编辑器",
|
||||
"preferences": "首选项"
|
||||
}
|
||||
@@ -10,15 +10,11 @@
|
||||
"previousSearchExcludePattern": "显示上一个搜索排除模式",
|
||||
"nextSearchTerm": "显示下一个搜索词",
|
||||
"previousSearchTerm": "显示上一个搜索词",
|
||||
"focusNextInputBox": "聚焦下一个输入框",
|
||||
"focusPreviousInputBox": "聚焦上一个输入框",
|
||||
"showSearchViewlet": "显示搜索",
|
||||
"findInFiles": "在文件中查找",
|
||||
"findInFilesWithSelectedText": "在文件中查找所选文本",
|
||||
"replaceInFiles": "在文件中替换",
|
||||
"replaceInFilesWithSelectedText": "在文件中替换所选文本",
|
||||
"findInWorkspace": "在工作区中查找...",
|
||||
"findInFolder": "在文件夹中查找...",
|
||||
"RefreshAction.label": "刷新",
|
||||
"collapse": "折叠",
|
||||
"ClearSearchResultsAction.label": "清除搜索结果",
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"showTriggerActions": "转到工作区中的符号...",
|
||||
"name": "搜索",
|
||||
"search": "搜索",
|
||||
"view": "查看",
|
||||
"openAnythingHandlerDescription": "转到文件",
|
||||
"openSymbolDescriptionNormal": "转到工作区中的符号",
|
||||
"searchOutputChannelTitle": "搜索",
|
||||
"searchConfigurationTitle": "搜索",
|
||||
"exclude": "配置 glob 模式以在搜索中排除文件和文件夹。从 files.exclude 设置中继承所有 glob 模式。",
|
||||
"exclude.boolean": "匹配文件路径所依据的 glob 模式。设置为 true 或 false 可启用或禁用该模式。",
|
||||
"exclude.when": "对匹配文件的同级文件的其他检查。使用 $(basename) 作为匹配文件名的变量。",
|
||||
"useRipgrep": "控制是否在文本和文件搜索中使用 ripgrep",
|
||||
"useIgnoreFiles": "控制搜索文件时是否使用 .gitignore 和 .ignore 文件。",
|
||||
"search.quickOpen.includeSymbols": "配置为在 Quick Open 文件结果中包括全局符号搜索的结果。",
|
||||
"search.followSymlinks": "控制是否在搜索中跟踪符号链接。"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"findInFolder": "在文件夹中查找...",
|
||||
"findInWorkspace": "在工作区中查找..."
|
||||
}
|
||||
@@ -30,7 +30,7 @@
|
||||
"TaskSystem.activeSame.noBackground": "任务 \"{0}\" 已处于活动状态。若要终止任务,请选择“任务”菜单中的“终止任务...”。",
|
||||
"TaskSystem.active": "当前已有任务正在运行。请先终止它,然后再执行另一项任务。",
|
||||
"TaskSystem.restartFailed": "未能终止并重启任务 {0}",
|
||||
"TaskService.noConfiguration": "错误: {0} 任务检测没有提供拥有下列配置的任务:\n{1}\n将忽略此任务。",
|
||||
"TaskService.noConfiguration": "错误: {0} 任务检测没有提供拥有下列配置的任务:\n{1}\n将忽略此任务。\n",
|
||||
"TaskSystem.configurationErrors": "错误: 提供的任务配置具有验证错误,无法使用。请首先改正错误。",
|
||||
"taskService.ignoreingFolder": "将忽略工作区文件夹 {0} 的任务配置。多文件夹工作区任务支持要求所有文件夹使用任务版本 2.0.0\n",
|
||||
"TaskSystem.invalidTaskJson": "错误: tasks.json 文件的内容具有语法错误。请先更正错误然后再执行任务。\n",
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"ConfigurationParser.noTypeDefinition": "错误: 没有注册任务类型“{0}”。你是不是忘记安装含有相应任务提供器的扩展?",
|
||||
"ConfigurationParser.missingRequiredProperty": "错误: 任务配置“{0}”缺失必要属性“{1}”。将忽略该任务。",
|
||||
"ConfigurationParser.notCustom": "错误: 任务未声明为自定义任务。将忽略配置。\n{0}\n",
|
||||
"ConfigurationParser.noTaskName": "错误: 任务必须提供 taskName 属性。将忽略该任务。\n{0}\n",
|
||||
"ConfigurationParser.noTaskName": "错误: 任务必须提供 label 属性。将忽略该任务。\n{0}\n",
|
||||
"taskConfiguration.shellArgs": "警告: 任务“{0}”是 shell 命令,而且其中一个参数可能含有未转义的空格。若要确保命令行引用正确,请将参数合并到该命令。",
|
||||
"taskConfiguration.noCommandOrDependsOn": "错误:任务“{0}”既不指定命令,也不指定 dependsOn 属性。将忽略该任务。其定义为:\n{1}",
|
||||
"taskConfiguration.noCommand": "错误: 任务“{0}”未定义命令。将忽略该任务。其定义为:\n{1}",
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
"terminal.integrated.rightClickCopyPaste": "设置后,在终端内右键单击时,这将阻止显示上下文菜单,相反,它将在有选项时进行复制,并且在没有选项时进行粘贴。",
|
||||
"terminal.integrated.fontFamily": "控制终端的字体系列,这在编辑器中是默认的。fontFamily 的值。",
|
||||
"terminal.integrated.fontSize": "控制终端的字号(以像素为单位)。",
|
||||
"terminal.integrated.lineHeight": "控制终端的行高,此数字乘以终端字号得到实际行高(以像素表示)。",
|
||||
"terminal.integrated.lineHeight": "控制终端的行高,此数字乘上终端字号得到实际行高(以像素为单位)。",
|
||||
"terminal.integrated.enableBold": "是否在终端内启用粗体文本,注意这需要终端命令行的支持。",
|
||||
"terminal.integrated.cursorBlinking": "控制终端光标是否闪烁。",
|
||||
"terminal.integrated.cursorStyle": "控制终端游标的样式。",
|
||||
|
||||
-2
@@ -4,9 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"migration.completed": "已向用户设置添加了新的主题设置。{0} 中可备份。",
|
||||
"error.cannotloadtheme": "无法加载 {0}: {1}",
|
||||
"error.cannotloadicontheme": "Unable to load {0}",
|
||||
"colorTheme": "指定工作台中使用的颜色主题。",
|
||||
"colorThemeError": "主题未知或未安装。",
|
||||
"iconTheme": "指定在工作台中使用的图标主题,或指定 \"null\" 以不显示任何文件图标。",
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"yes": "是",
|
||||
"no": "否"
|
||||
}
|
||||
@@ -74,7 +74,6 @@
|
||||
"no stashes": "沒有要隱藏可供還原。",
|
||||
"pick stash to pop": "請挑選要快顯的隱藏",
|
||||
"clean repo": "請先清除您的本地儲存庫工作區再簽出。",
|
||||
"cant push": "無法將參考推送到遠端。請先執行 [提取] 以整合您的變更。",
|
||||
"git error details": "Git: {0}",
|
||||
"git error": "Git 錯誤",
|
||||
"open git log": "開啟 Git 記錄"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"using git": "正在使用來自 {1} 的 git {0}",
|
||||
"updateGit": "更新 Git",
|
||||
"neverShowAgain": "不要再顯示",
|
||||
"updateGit": "更新 Git",
|
||||
"git20": "您似乎已安裝 Git {0}。Code 搭配 Git >= 2 的執行效果最佳"
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"secondInstanceNoResponse": "另一個 {0} 執行個體正在執行,但沒有回應",
|
||||
"secondInstanceNoResponseDetail": "請關閉其他所有執行個體,然後再試一次。",
|
||||
"secondInstanceAdminDetail": "請關閉其他執行個體,然後再試一次。",
|
||||
"close": "關閉(&&C)"
|
||||
}
|
||||
@@ -25,6 +25,7 @@
|
||||
"miOpenFolder": "開啟資料夾(&&F)...",
|
||||
"miOpenFile": "開啟檔案(&&O)...",
|
||||
"miOpenRecent": "開啟最近的檔案(&&R)",
|
||||
"miSaveWorkspaceAs": "另存工作區為...",
|
||||
"miSave": "儲存(&&S)",
|
||||
"miSaveAs": "另存新檔(&&A)...",
|
||||
"miSaveAll": "全部儲存(&&L)",
|
||||
@@ -181,6 +182,6 @@
|
||||
"miDownloadingUpdate": "正在下載更新...",
|
||||
"miInstallingUpdate": "正在安裝更新...",
|
||||
"miCheckForUpdates": "查看是否有更新",
|
||||
"aboutDetail": "\n版本 {0}\n認可 {1}\n日期 {2}\nShell {3}\n轉譯器 {4}\n節點 {5}\n架構 {6}",
|
||||
"okButton": "確定"
|
||||
"okButton": "確定",
|
||||
"copy": "複製(&&C)"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"wordSeparators": "執行文字相關導覽或作業時將作為文字分隔符號的字元",
|
||||
"tabSize": "與 Tab 相等的空格數量。當 `editor.detectIndentation` 已開啟時,會根據檔案內容覆寫此設定。",
|
||||
"tabSize.errorMessage": "必須是 'number'。請注意,值 \"auto\" 已由 `editor.detectIndentation` 設定取代。",
|
||||
"insertSpaces": "在按 Tab 時插入空格。當 `editor.detectIndentation` 已開啟時,會根據檔案內容覆寫此設定。",
|
||||
"insertSpaces": "與 Tab 相等的空格數量。當 `editor.detectIndentation` 已開啟時,會根據檔案內容覆寫此設定。",
|
||||
"insertSpaces.errorMessage": "必須是 'boolean'。請注意,值 \"auto\" 已由 `editor.detect Indentation` 設定取代。",
|
||||
"detectIndentation": "開啟檔案時,會依據檔案內容來偵測 `editor.tabSize` 及 `editor.insertSpaces`。",
|
||||
"roundedSelection": "控制選取範圍是否有圓角",
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"unFoldRecursivelyAction.label": "以遞迴方式展開",
|
||||
"foldAction.label": "摺疊",
|
||||
"foldRecursivelyAction.label": "以遞迴方式摺疊",
|
||||
"foldAllBlockComments.label": "摺疊全部區塊註解",
|
||||
"foldAllAction.label": "全部摺疊",
|
||||
"unfoldAllAction.label": "全部展開",
|
||||
"foldLevelAction.label": "摺疊層級 {0}"
|
||||
|
||||
@@ -3,7 +3,4 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
// Do not edit this file. It is machine generated.
|
||||
{
|
||||
"notFound": "找不到擴充功能",
|
||||
"noCompatible": "找不到與此 Code 版本相容的 {0} 版本。"
|
||||
}
|
||||
{}
|
||||
+1
-2
@@ -6,11 +6,10 @@
|
||||
{
|
||||
"invalidManifest": "擴充功能無效: package.json 不是 JSON 檔案。",
|
||||
"restartCodeLocal": "請先重新啟動 Code,再重新安裝 {0}。",
|
||||
"restartCodeGallery": "重新安裝之前,請先重新啟動 Code。",
|
||||
"cancel": "取消",
|
||||
"uninstallDependeciesConfirmation": "只要將 '{0}' 解除安裝,或要包含其相依性?",
|
||||
"uninstallOnly": "只有",
|
||||
"uninstallAll": "全部",
|
||||
"cancel": "取消",
|
||||
"uninstallConfirmation": "確定要將 '{0}' 解除安裝嗎?",
|
||||
"ok": "確定",
|
||||
"singleDependentError": "無法將延伸模組 '{0}' 解除安裝。其為延伸模組 '{1}' 的相依對象。",
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
"openPreviousEditor": "開啟上一個編輯器",
|
||||
"nextEditorInGroup": "開啟群組中下一個編輯器",
|
||||
"openPreviousEditorInGroup": "開啟群組中上一個編輯器",
|
||||
"lastEditorInGroup": "開啟群組中最後一個編輯器",
|
||||
"navigateNext": "向前",
|
||||
"navigatePrevious": "向後",
|
||||
"navigateLast": "移至最後",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user