@@ -13,6 +13,13 @@ import { isTypeScriptDocument } from '../utils/languageModeIds';
13
13
import { equals } from '../utils/objects' ;
14
14
import { ResourceMap } from '../utils/resourceMap' ;
15
15
16
+ namespace Experimental {
17
+ // https://github.com/microsoft/TypeScript/pull/37871/
18
+ export interface UserPreferences extends Proto . UserPreferences {
19
+ readonly provideRefactorNotApplicableReason ?: boolean ;
20
+ }
21
+ }
22
+
16
23
interface FileConfiguration {
17
24
readonly formatOptions : Proto . FormatCodeSettings ;
18
25
readonly preferences : Proto . UserPreferences ;
@@ -170,14 +177,15 @@ export default class FileConfigurationManager extends Disposable {
170
177
isTypeScriptDocument ( document ) ? 'typescript.preferences' : 'javascript.preferences' ,
171
178
document . uri ) ;
172
179
173
- const preferences : Proto . UserPreferences = {
180
+ const preferences : Experimental . UserPreferences = {
174
181
quotePreference : this . getQuoteStylePreference ( preferencesConfig ) ,
175
182
importModuleSpecifierPreference : getImportModuleSpecifierPreference ( preferencesConfig ) ,
176
183
importModuleSpecifierEnding : getImportModuleSpecifierEndingPreference ( preferencesConfig ) ,
177
184
allowTextChangesInNewFiles : document . uri . scheme === fileSchemes . file ,
178
185
providePrefixAndSuffixTextForRename : preferencesConfig . get < boolean > ( 'renameShorthandProperties' , true ) === false ? false : preferencesConfig . get < boolean > ( 'useAliasesForRenames' , true ) ,
179
186
allowRenameOfImportPath : true ,
180
187
includeAutomaticOptionalChainCompletions : config . get < boolean > ( 'suggest.includeAutomaticOptionalChainCompletions' , true ) ,
188
+ provideRefactorNotApplicableReason : true ,
181
189
} ;
182
190
183
191
return preferences ;
0 commit comments