Rename jsDocCompletion.enabled to javascript.suggest.completeJsDocs and typescript.suggest.completeJsDocs

Fixes #67146
This commit is contained in:
Matt Bierner 2019-01-28 14:03:20 -08:00
parent 58d3dade0e
commit 807759ecff
4 changed files with 19 additions and 3 deletions

View file

@ -362,6 +362,7 @@
"type": "boolean",
"default": true,
"description": "%jsDocCompletion.enabled%",
"deprecationMessage": "jsDocCompletion.deprecationMessage",
"scope": "resource"
},
"javascript.implicitProjectConfig.checkJs": {
@ -424,6 +425,18 @@
"description": "%configuration.suggest.autoImports%",
"scope": "resource"
},
"javascript.suggest.completeJSDocs": {
"type": "boolean",
"default": true,
"description": "%configuration.suggest.completeJSDocs%",
"scope": "resource"
},
"typescript.suggest.completeJSDocs": {
"type": "boolean",
"default": true,
"description": "%configuration.suggest.completeJSDocs%",
"scope": "resource"
},
"typescript.locale": {
"type": [
"string",

View file

@ -38,6 +38,7 @@
"typescript.selectTypeScriptVersion.title": "Select TypeScript Version.",
"typescript.reportStyleChecksAsWarnings": "Report style checks as warnings.",
"jsDocCompletion.enabled": "Enable/disable auto JSDoc comments.",
"jsDocCompletion.deprecationMessage": "This setting has renamed to `javascript.suggest.completeJSDocs` and `typescript.suggest.completeJSDocs` and will be removed.",
"javascript.implicitProjectConfig.checkJs": "Enable/disable semantic checking of JavaScript files. Existing jsconfig.json or tsconfig.json files override this setting. Requires using TypeScript 2.3.1 or newer in the workspace.",
"typescript.npm": "Specifies the path to the NPM executable used for Automatic Type Acquisition. Requires using TypeScript 2.3.4 or newer in the workspace.",
"typescript.check.npmIsInstalled": "Check if NPM is installed for Automatic Type Acquisition.",
@ -67,5 +68,6 @@
"typescript.updateImportsOnFileMove.enabled.never": "Never rename paths and don't prompt.",
"typescript.autoClosingTags": "Enable/disable automatic closing of JSX tags. Requires using TypeScript 3.0 or newer in the workspace.",
"typescript.suggest.enabled": "Enabled/disable autocomplete suggestions.",
"configuration.surveys.enabled": "Enabled/disable occasional surveys that help us improve VS Code's JavaScript and TypeScript support."
"configuration.surveys.enabled": "Enabled/disable occasional surveys that help us improve VS Code's JavaScript and TypeScript support.",
"configuration.suggest.completeJSDocs": "Enable/disable suggestion to complete JSDoc comments."
}

View file

@ -112,9 +112,10 @@ export function templateToSnippet(template: string): vscode.SnippetString {
export function register(
selector: vscode.DocumentSelector,
modeId: string,
client: ITypeScriptServiceClient,
): vscode.Disposable {
return new ConfigurationDependentRegistration('jsDocCompletion', 'enabled', () => {
return new ConfigurationDependentRegistration(modeId, 'suggest.completeJSDocs', () => {
return vscode.languages.registerCompletionItemProvider(selector,
new JsDocCompletionProvider(client),
'*');

View file

@ -65,7 +65,7 @@ export default class LanguageProvider extends Disposable {
this._register((await import('./features/hover')).register(selector, this.client));
this._register((await import('./features/implementations')).register(selector, this.client));
this._register((await import('./features/implementationsCodeLens')).register(selector, this.description.id, this.client, cachedResponse));
this._register((await import('./features/jsDocCompletions')).register(selector, this.client));
this._register((await import('./features/jsDocCompletions')).register(selector, this.description.id, this.client));
this._register((await import('./features/organizeImports')).register(selector, this.client, this.commandManager, this.fileConfigurationManager, this.telemetryReporter));
this._register((await import('./features/quickFix')).register(selector, this.client, this.fileConfigurationManager, this.commandManager, this.client.diagnosticsManager, this.telemetryReporter));
this._register((await import('./features/fixAll')).register(selector, this.client, this.fileConfigurationManager, this.client.diagnosticsManager));