mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 12:33:35 +01:00
Add preference to disable shorthand renaming
Fixes #68029 Use the `typescript.preferences.renameShorthandProperties` and `javascript.preferences.renameShorthandProperties` to disable shorthand property renames. Default to enabling renames
This commit is contained in:
@@ -173,15 +173,15 @@ export default class FileConfigurationManager extends Disposable {
|
||||
return {};
|
||||
}
|
||||
|
||||
const preferences = vscode.workspace.getConfiguration(
|
||||
const config = vscode.workspace.getConfiguration(
|
||||
isTypeScriptDocument(document) ? 'typescript.preferences' : 'javascript.preferences',
|
||||
document.uri);
|
||||
|
||||
return {
|
||||
quotePreference: this.getQuoteStylePreference(preferences),
|
||||
importModuleSpecifierPreference: getImportModuleSpecifierPreference(preferences),
|
||||
quotePreference: this.getQuoteStylePreference(config),
|
||||
importModuleSpecifierPreference: getImportModuleSpecifierPreference(config),
|
||||
allowTextChangesInNewFiles: document.uri.scheme === 'file',
|
||||
providePrefixAndSuffixTextForRename: true,
|
||||
providePrefixAndSuffixTextForRename: config.get<boolean>('renameShorthandProperties', true),
|
||||
allowRenameOfImportPath: true,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user