mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 13:29:44 +00:00
parent
6c10fb4371
commit
65c6a0a543
|
@ -127,7 +127,6 @@ export function getJavaScriptMode(documentRegions: LanguageModelCache<HTMLDocume
|
||||||
async doResolve(document: TextDocument, item: CompletionItem): Promise<CompletionItem> {
|
async doResolve(document: TextDocument, item: CompletionItem): Promise<CompletionItem> {
|
||||||
const jsDocument = jsDocuments.get(document);
|
const jsDocument = jsDocuments.get(document);
|
||||||
const jsLanguageService = await host.getLanguageService(jsDocument);
|
const jsLanguageService = await host.getLanguageService(jsDocument);
|
||||||
// @ts-expect-error until 4.3 protocol update
|
|
||||||
let details = jsLanguageService.getCompletionEntryDetails(jsDocument.uri, item.data.offset, item.label, undefined, undefined, undefined, undefined);
|
let details = jsLanguageService.getCompletionEntryDetails(jsDocument.uri, item.data.offset, item.label, undefined, undefined, undefined, undefined);
|
||||||
if (details) {
|
if (details) {
|
||||||
item.detail = ts.displayPartsToString(details.displayParts);
|
item.detail = ts.displayPartsToString(details.displayParts);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "Dependencies shared by all extensions",
|
"description": "Dependencies shared by all extensions",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"typescript": "4.2.4"
|
"typescript": "^4.3.0-dev.20210503"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "node ./postinstall"
|
"postinstall": "node ./postinstall"
|
||||||
|
|
|
@ -79,7 +79,6 @@ class MyCompletionItem extends vscode.CompletionItem {
|
||||||
this.sortText = tsEntry.sortText;
|
this.sortText = tsEntry.sortText;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-expect-error until 4.3 protocol update
|
|
||||||
const { sourceDisplay, isSnippet } = tsEntry;
|
const { sourceDisplay, isSnippet } = tsEntry;
|
||||||
if (sourceDisplay) {
|
if (sourceDisplay) {
|
||||||
this.label2 = { name: tsEntry.name, qualifier: Previewer.plainWithLinks(sourceDisplay, client) };
|
this.label2 = { name: tsEntry.name, qualifier: Previewer.plainWithLinks(sourceDisplay, client) };
|
||||||
|
@ -184,11 +183,9 @@ class MyCompletionItem extends vscode.CompletionItem {
|
||||||
const args: Proto.CompletionDetailsRequestArgs = {
|
const args: Proto.CompletionDetailsRequestArgs = {
|
||||||
...typeConverters.Position.toFileLocationRequestArgs(filepath, this.position),
|
...typeConverters.Position.toFileLocationRequestArgs(filepath, this.position),
|
||||||
entryNames: [
|
entryNames: [
|
||||||
// @ts-expect-error until TypeScript 4.3 protocol update
|
|
||||||
this.tsEntry.source || this.tsEntry.data ? {
|
this.tsEntry.source || this.tsEntry.data ? {
|
||||||
name: this.tsEntry.name,
|
name: this.tsEntry.name,
|
||||||
source: this.tsEntry.source,
|
source: this.tsEntry.source,
|
||||||
// @ts-expect-error until TypeScript 4.3 protocol update
|
|
||||||
data: this.tsEntry.data,
|
data: this.tsEntry.data,
|
||||||
} : this.tsEntry.name
|
} : this.tsEntry.name
|
||||||
]
|
]
|
||||||
|
@ -561,7 +558,6 @@ class CompletionAcceptedCommand implements Command {
|
||||||
*/
|
*/
|
||||||
this.telemetryReporter.logTelemetry('completions.accept', {
|
this.telemetryReporter.logTelemetry('completions.accept', {
|
||||||
isPackageJsonImport: item.tsEntry.isPackageJsonImport ? 'true' : undefined,
|
isPackageJsonImport: item.tsEntry.isPackageJsonImport ? 'true' : undefined,
|
||||||
// @ts-expect-error until 4.3 protocol update
|
|
||||||
isImportStatementCompletion: item.tsEntry.isImportStatementCompletion ? 'true' : undefined,
|
isImportStatementCompletion: item.tsEntry.isImportStatementCompletion ? 'true' : undefined,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -753,7 +749,6 @@ class TypeScriptCompletionItemProvider implements vscode.CompletionItemProvider<
|
||||||
dotAccessorContext = { range, text };
|
dotAccessorContext = { range, text };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// @ts-expect-error until 4.3 protocol update
|
|
||||||
isIncomplete = !!response.body.isIncomplete || (response as any).metadata && (response as any).metadata.isIncomplete;
|
isIncomplete = !!response.body.isIncomplete || (response as any).metadata && (response as any).metadata.isIncomplete;
|
||||||
entries = response.body.entries;
|
entries = response.body.entries;
|
||||||
metadata = response.metadata;
|
metadata = response.metadata;
|
||||||
|
@ -792,7 +787,6 @@ class TypeScriptCompletionItemProvider implements vscode.CompletionItemProvider<
|
||||||
};
|
};
|
||||||
items.push(item);
|
items.push(item);
|
||||||
includesPackageJsonImport = includesPackageJsonImport || !!entry.isPackageJsonImport;
|
includesPackageJsonImport = includesPackageJsonImport || !!entry.isPackageJsonImport;
|
||||||
// @ts-expect-error until 4.3 protocol update
|
|
||||||
includesImportStatementCompletion = includesImportStatementCompletion || !!entry.isImportStatementCompletion;
|
includesImportStatementCompletion = includesImportStatementCompletion || !!entry.isImportStatementCompletion;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -842,7 +836,6 @@ class TypeScriptCompletionItemProvider implements vscode.CompletionItemProvider<
|
||||||
return this.client.apiVersion.lt(API.v381) ? undefined : '#';
|
return this.client.apiVersion.lt(API.v381) ? undefined : '#';
|
||||||
|
|
||||||
case ' ':
|
case ' ':
|
||||||
// @ts-expect-error until 4.3.0 protocol update
|
|
||||||
const space: Proto.CompletionsTriggerCharacter = ' ';
|
const space: Proto.CompletionsTriggerCharacter = ' ';
|
||||||
return this.client.apiVersion.gte(API.v430) ? space : undefined;
|
return this.client.apiVersion.gte(API.v430) ? space : undefined;
|
||||||
|
|
||||||
|
|
|
@ -183,7 +183,6 @@ export default class FileConfigurationManager extends Disposable {
|
||||||
includeAutomaticOptionalChainCompletions: config.get<boolean>('suggest.includeAutomaticOptionalChainCompletions', true),
|
includeAutomaticOptionalChainCompletions: config.get<boolean>('suggest.includeAutomaticOptionalChainCompletions', true),
|
||||||
provideRefactorNotApplicableReason: true,
|
provideRefactorNotApplicableReason: true,
|
||||||
generateReturnInDocTemplate: config.get<boolean>('suggest.jsdoc.generateReturns', true),
|
generateReturnInDocTemplate: config.get<boolean>('suggest.jsdoc.generateReturns', true),
|
||||||
// @ts-expect-error until 4.3 protocol update
|
|
||||||
includeCompletionsForImportStatements: config.get<boolean>('suggest.includeCompletionsForImportStatements', true),
|
includeCompletionsForImportStatements: config.get<boolean>('suggest.includeCompletionsForImportStatements', true),
|
||||||
includeCompletionsWithSnippetText: config.get<boolean>('suggest.includeCompletionsWithSnippetText', true),
|
includeCompletionsWithSnippetText: config.get<boolean>('suggest.includeCompletionsWithSnippetText', true),
|
||||||
displayPartsForJSDoc: true,
|
displayPartsForJSDoc: true,
|
||||||
|
|
|
@ -24,10 +24,10 @@ fast-plist@0.1.2:
|
||||||
resolved "https://registry.yarnpkg.com/fast-plist/-/fast-plist-0.1.2.tgz#a45aff345196006d406ca6cdcd05f69051ef35b8"
|
resolved "https://registry.yarnpkg.com/fast-plist/-/fast-plist-0.1.2.tgz#a45aff345196006d406ca6cdcd05f69051ef35b8"
|
||||||
integrity sha1-pFr/NFGWAG1AbKbNzQX2kFHvNbg=
|
integrity sha1-pFr/NFGWAG1AbKbNzQX2kFHvNbg=
|
||||||
|
|
||||||
typescript@4.2.4:
|
typescript@^4.3.0-dev.20210503:
|
||||||
version "4.2.4"
|
version "4.3.0-dev.20210503"
|
||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.0-dev.20210503.tgz#0a3eb480676effd4975beb5a2f097530ed53550a"
|
||||||
integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==
|
integrity sha512-Gj3TQve5PLCZoPBy96Yp6Y3+jNLmms0i3ynhxEJAKgax7Fxui29/uG/DClbBtKz1peNhzXwikXVFFAV1BB/3mw==
|
||||||
|
|
||||||
vscode-grammar-updater@^1.0.3:
|
vscode-grammar-updater@^1.0.3:
|
||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
|
|
Loading…
Reference in a new issue