@@ -82,7 +82,6 @@ export interface ISettings {
82
82
// This setting is no longer used but is here to assist in cleaning up the users settings.
83
83
powerShellExePath : string | undefined ;
84
84
promptToUpdatePowerShell : boolean ;
85
- bundledModulesPath : string ;
86
85
startAsLoginShell : IStartAsLoginShellSettings ;
87
86
startAutomatically : boolean ;
88
87
enableProfileLoading : boolean ;
@@ -117,10 +116,12 @@ export interface IIntegratedConsoleSettings {
117
116
}
118
117
119
118
export interface ISideBarSettings {
119
+ // TODO: add CommandExplorerExcludeFilter
120
120
CommandExplorerVisibility : boolean ;
121
121
}
122
122
123
123
export interface IPesterSettings {
124
+ // TODO: add codeLens property
124
125
useLegacyCodeLens : boolean ;
125
126
outputVerbosity : string ;
126
127
debugOutputVerbosity : string ;
@@ -161,7 +162,7 @@ export function load(): ISettings {
161
162
162
163
const defaultCodeFoldingSettings : ICodeFoldingSettings = {
163
164
enable : true ,
164
- showLastLine : false ,
165
+ showLastLine : true ,
165
166
} ;
166
167
167
168
const defaultCodeFormattingSettings : ICodeFormattingSettings = {
@@ -215,7 +216,10 @@ export function load(): ISettings {
215
216
debugOutputVerbosity : "Diagnostic" ,
216
217
} ;
217
218
218
- // TODO: I believe all the defaults can be removed, as the `package.json` should supply them (and be the source of truth).
219
+ // TODO: I believe all the defaults can be removed, as the `package.json`
220
+ // should supply them (and be the source of truth). However, this proves
221
+ // fairly messy to do as it requires casting the configuration to unknown
222
+ // and then to `ISettings`. It could work but will take more testing.
219
223
return {
220
224
startAutomatically :
221
225
configuration . get < boolean > ( "startAutomatically" , true ) ,
@@ -227,18 +231,16 @@ export function load(): ISettings {
227
231
configuration . get < string > ( "powerShellExePath" ) ,
228
232
promptToUpdatePowerShell :
229
233
configuration . get < boolean > ( "promptToUpdatePowerShell" , true ) ,
230
- bundledModulesPath :
231
- "../modules" , // Because the extension is always at `<root>/out/main.js`
232
234
enableProfileLoading :
233
- configuration . get < boolean > ( "enableProfileLoading" , false ) ,
235
+ configuration . get < boolean > ( "enableProfileLoading" , true ) ,
234
236
helpCompletion :
235
237
configuration . get < string > ( "helpCompletion" , CommentType . BlockComment ) ,
236
238
scriptAnalysis :
237
239
configuration . get < IScriptAnalysisSettings > ( "scriptAnalysis" , defaultScriptAnalysisSettings ) ,
238
240
debugging :
239
241
configuration . get < IDebuggingSettings > ( "debugging" , defaultDebuggingSettings ) ,
240
242
developer :
241
- getWorkspaceSettingsWithDefaults < IDeveloperSettings > ( configuration , "developer" , defaultDeveloperSettings ) ,
243
+ configuration . get < IDeveloperSettings > ( "developer" , defaultDeveloperSettings ) ,
242
244
codeFolding :
243
245
configuration . get < ICodeFoldingSettings > ( "codeFolding" , defaultCodeFoldingSettings ) ,
244
246
codeFormatting :
@@ -264,7 +266,7 @@ export function load(): ISettings {
264
266
enableReferencesCodeLens :
265
267
configuration . get < boolean > ( "enableReferencesCodeLens" , true ) ,
266
268
analyzeOpenDocumentsOnly :
267
- configuration . get < boolean > ( "analyzeOpenDocumentsOnly" , true ) ,
269
+ configuration . get < boolean > ( "analyzeOpenDocumentsOnly" , false ) ,
268
270
} ;
269
271
}
270
272
@@ -303,19 +305,6 @@ export async function change(
303
305
}
304
306
}
305
307
306
- function getWorkspaceSettingsWithDefaults < TSettings > (
307
- workspaceConfiguration : vscode . WorkspaceConfiguration ,
308
- settingName : string ,
309
- defaultSettings : TSettings ) : TSettings {
310
-
311
- const importedSettings : TSettings = workspaceConfiguration . get < TSettings > ( settingName , defaultSettings ) ;
312
-
313
- for ( const setting in importedSettings ) {
314
- defaultSettings [ setting ] = importedSettings [ setting ] ;
315
- }
316
- return defaultSettings ;
317
- }
318
-
319
308
// We don't want to query the user more than once, so this is idempotent.
320
309
let hasPrompted = false ;
321
310
0 commit comments