Remove deprecated js/ts completion settings
These were marked as deprecated in VS Code 1.28 and are now being removed
This commit is contained in:
parent
a3fa7ad178
commit
a57e7abae2
3 changed files with 3 additions and 46 deletions
|
@ -141,13 +141,6 @@
|
|||
"description": "%typescript.tsserver.trace%",
|
||||
"scope": "window"
|
||||
},
|
||||
"typescript.useCodeSnippetsOnMethodSuggest": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "%typescript.useCodeSnippetsOnMethodSuggest.dec%",
|
||||
"scope": "resource",
|
||||
"deprecationMessage": "%typescript.useCodeSnippetsOnMethodSuggest.deprecationMessage%"
|
||||
},
|
||||
"javascript.suggest.completeFunctionCalls": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
|
@ -382,13 +375,6 @@
|
|||
"markdownDescription": "%javascript.implicitProjectConfig.experimentalDecorators%",
|
||||
"scope": "window"
|
||||
},
|
||||
"javascript.nameSuggestions": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "%javascript.nameSuggestions%",
|
||||
"scope": "resource",
|
||||
"deprecationMessage": "%javascript.nameSuggestions.deprecationMessage%"
|
||||
},
|
||||
"javascript.suggest.names": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
|
@ -413,13 +399,6 @@
|
|||
"description": "%typescript.tsc.autoDetect%",
|
||||
"scope": "window"
|
||||
},
|
||||
"typescript.quickSuggestionsForPaths": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "%typescript.quickSuggestionsForPaths%",
|
||||
"scope": "resource",
|
||||
"deprecationMessage": "%typescript.quickSuggestionsForPaths.deprecationMessage%"
|
||||
},
|
||||
"javascript.suggest.paths": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
|
@ -432,13 +411,6 @@
|
|||
"description": "%configuration.suggest.paths%",
|
||||
"scope": "resource"
|
||||
},
|
||||
"typescript.autoImportSuggestions.enabled": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "%typescript.autoImportSuggestions.enabled%",
|
||||
"scope": "resource",
|
||||
"deprecationMessage": "%typescript.autoImportSuggestions.enabled.deprecationMessage%"
|
||||
},
|
||||
"javascript.suggest.autoImports": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
"description": "Provides rich language support for JavaScript and TypeScript.",
|
||||
"reloadProjects.title": "Reload Project",
|
||||
"configuration.typescript": "TypeScript",
|
||||
"typescript.useCodeSnippetsOnMethodSuggest.dec": "Complete functions with their parameter signature.",
|
||||
"typescript.useCodeSnippetsOnMethodSuggest.deprecationMessage": "Please use the new `javascript.suggest.completeFunctionCalls` and `typescript.suggest.completeFunctionCalls` settings.",
|
||||
"configuration.suggest.completeFunctionCalls": "Complete functions with their parameter signature.",
|
||||
"typescript.tsdk.desc": "Specifies the folder path containing the tsserver and lib*.d.ts files to use.",
|
||||
"typescript.disableAutomaticTypeAcquisition": "Disables automatic type acquisition.",
|
||||
|
@ -43,8 +41,6 @@
|
|||
"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.",
|
||||
"javascript.nameSuggestions": "Enable/disable including unique names from the file in JavaScript suggestion lists.",
|
||||
"javascript.nameSuggestions.deprecationMessage": "Please use the new `javascript.suggest.names` setting.",
|
||||
"configuration.suggest.names": "Enable/disable including unique names from the file in JavaScript suggestions.",
|
||||
"typescript.tsc.autoDetect": "Controls auto detection of tsc tasks.",
|
||||
"typescript.tsc.autoDetect.off": "Disable this feature.",
|
||||
|
@ -53,14 +49,10 @@
|
|||
"typescript.tsc.autoDetect.watch": "Only create compile and watch tasks.",
|
||||
"typescript.problemMatchers.tsc.label": "TypeScript problems",
|
||||
"typescript.problemMatchers.tscWatch.label": "TypeScript problems (watch mode)",
|
||||
"typescript.quickSuggestionsForPaths": "Enable/disable quick suggestions when typing out an import path.",
|
||||
"typescript.quickSuggestionsForPaths.deprecationMessage": "Please use the new `javascript.suggest.paths` and `typescript.suggest.paths` settings to enable/disable path suggestions.",
|
||||
"configuration.suggest.paths": "Enable/disable suggestions for paths in import statements and require calls.",
|
||||
"typescript.locale": "Sets the locale used to report JavaScript and TypeScript errors. Requires using TypeScript 2.6.0 or newer in the workspace. Default of `null` uses VS Code's locale.",
|
||||
"javascript.implicitProjectConfig.experimentalDecorators": "Enable/disable `experimentalDecorators` for JavaScript files that are not part of a project. Existing jsconfig.json or tsconfig.json files override this setting. Requires using TypeScript 2.3.1 or newer in the workspace.",
|
||||
"configuration.suggest.autoImports": "Enable/disable auto import suggestions. Requires using TypeScript 2.6.1 or newer in the workspace.",
|
||||
"typescript.autoImportSuggestions.enabled": "Enable/disable auto import suggestions. Requires using TypeScript 2.6.1 or newer in the workspace.",
|
||||
"typescript.autoImportSuggestions.enabled.deprecationMessage": "Please use the new 'typescript.suggest.autoImports' and 'javascript.suggest.autoImports' settings.",
|
||||
"taskDefinition.tsconfig.description": "The tsconfig file that defines the TS build.",
|
||||
"javascript.suggestionActions.enabled": "Enable/disable suggestion diagnostics for JavaScript files in the editor. Requires using TypeScript 2.8 or newer in the workspace.",
|
||||
"typescript.suggestionActions.enabled": "Enable/disable suggestion diagnostics for TypeScript files in the editor. Requires using TypeScript 2.8 or newer in the workspace.",
|
||||
|
|
|
@ -242,27 +242,20 @@ interface CompletionConfiguration {
|
|||
|
||||
namespace CompletionConfiguration {
|
||||
export const useCodeSnippetsOnMethodSuggest = 'suggest.completeFunctionCalls';
|
||||
export const useCodeSnippetsOnMethodSuggest_deprecated = 'useCodeSnippetsOnMethodSuggest';
|
||||
export const nameSuggestions = 'suggest.names';
|
||||
export const nameSuggestions_deprecated = 'nameSuggestions';
|
||||
export const pathSuggestions = 'suggest.paths';
|
||||
export const autoImportSuggestions = 'suggest.autoImports';
|
||||
export const autoImportSuggestions_deprecated = 'autoImportSuggestions.enabled';
|
||||
|
||||
export function getConfigurationForResource(
|
||||
modeId: string,
|
||||
resource: vscode.Uri
|
||||
): CompletionConfiguration {
|
||||
const config = vscode.workspace.getConfiguration(modeId, resource);
|
||||
|
||||
// Deprecated TS settings that were shared by both JS and TS.
|
||||
const typeScriptConfig = vscode.workspace.getConfiguration('typescript', resource);
|
||||
|
||||
return {
|
||||
useCodeSnippetsOnMethodSuggest: config.get<boolean>(CompletionConfiguration.useCodeSnippetsOnMethodSuggest, typeScriptConfig.get<boolean>(CompletionConfiguration.useCodeSnippetsOnMethodSuggest_deprecated, false)),
|
||||
useCodeSnippetsOnMethodSuggest: config.get<boolean>(CompletionConfiguration.useCodeSnippetsOnMethodSuggest, false),
|
||||
pathSuggestions: config.get<boolean>(CompletionConfiguration.pathSuggestions, true),
|
||||
autoImportSuggestions: config.get<boolean>(CompletionConfiguration.autoImportSuggestions, typeScriptConfig.get<boolean>(CompletionConfiguration.autoImportSuggestions_deprecated, true)),
|
||||
nameSuggestions: config.get<boolean>(CompletionConfiguration.nameSuggestions, vscode.workspace.getConfiguration('javascript', resource).get(CompletionConfiguration.nameSuggestions_deprecated, true))
|
||||
autoImportSuggestions: config.get<boolean>(CompletionConfiguration.autoImportSuggestions, true),
|
||||
nameSuggestions: config.get<boolean>(CompletionConfiguration.nameSuggestions, true)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue