Skip to content

Commit 0ecdb0d

Browse files
committed
Replaces empty config with proxy
1 parent ca71d5d commit 0ecdb0d

File tree

1 file changed

+5
-200
lines changed

1 file changed

+5
-200
lines changed

src/configuration.ts

Lines changed: 5 additions & 200 deletions
Original file line numberDiff line numberDiff line change
@@ -319,207 +319,12 @@ export interface IConfig {
319319
advanced: IAdvancedConfig;
320320
}
321321

322-
const emptyConfig: IConfig = {
323-
annotations: {
324-
file: {
325-
gutter: {
326-
format: '',
327-
dateFormat: null,
328-
compact: false,
329-
heatmap: {
330-
enabled: false,
331-
location: 'left'
332-
},
333-
hover: {
334-
details: false,
335-
changes: false,
336-
wholeLine: false
337-
},
338-
separateLines: false
339-
},
340-
hover: {
341-
details: false,
342-
changes: false,
343-
heatmap: {
344-
enabled: false
345-
}
346-
},
347-
recentChanges: {
348-
hover: {
349-
details: false,
350-
changes: false
351-
}
352-
}
353-
},
354-
line: {
355-
hover: {
356-
details: false,
357-
changes: false
358-
},
359-
trailing: {
360-
format: '',
361-
dateFormat: null,
362-
hover: {
363-
details: false,
364-
changes: false,
365-
wholeLine: false
366-
}
367-
}
368-
}
369-
},
370-
blame: {
371-
ignoreWhitespace: false,
372-
file: {
373-
annotationType: 'gutter' as FileAnnotationType,
374-
lineHighlight: {
375-
enabled: false,
376-
locations: []
377-
}
378-
},
379-
line: {
380-
enabled: false,
381-
annotationType: 'trailing' as LineAnnotationType
382-
}
383-
},
384-
recentChanges: {
385-
file: {
386-
lineHighlight: {
387-
locations: []
388-
}
389-
}
390-
},
391-
codeLens: {
392-
enabled: false,
393-
recentChange: {
394-
enabled: false,
395-
command: CodeLensCommand.DiffWithPrevious
396-
},
397-
authors: {
398-
enabled: false,
399-
command: CodeLensCommand.DiffWithPrevious
400-
},
401-
locations: [],
402-
customLocationSymbols: [],
403-
perLanguageLocations: [],
404-
debug: false
405-
},
406-
defaultDateFormat: null,
407-
defaultDateStyle: 'relative' as DateStyle,
408-
gitExplorer: {
409-
autoRefresh: false,
410-
enabled: false,
411-
files: {
412-
layout: ExplorerFilesLayout.Auto,
413-
compact: false,
414-
threshold: 0
415-
},
416-
commitFormat: '',
417-
commitFileFormat: '',
418-
// dateFormat: string | null;
419-
gravatars: false,
420-
gravatarsDefault: 'robohash' as GravatarDefault,
421-
includeWorkingTree: false,
422-
showTrackingBranch: false,
423-
stashFormat: '',
424-
stashFileFormat: '',
425-
statusFileFormat: '',
426-
view: GitExplorerView.Auto
427-
},
428-
keymap: 'standard' as KeyMap,
429-
remotes: [],
430-
resultsExplorer: {
431-
files: {
432-
layout: ExplorerFilesLayout.Auto,
433-
compact: false,
434-
threshold: 0
435-
},
436-
commitFormat: '',
437-
commitFileFormat: '',
438-
// dateFormat: string | null;
439-
gravatars: false,
440-
gravatarsDefault: 'robohash' as GravatarDefault,
441-
showTrackingBranch: false,
442-
stashFormat: '',
443-
stashFileFormat: '',
444-
statusFileFormat: ''
445-
},
446-
statusBar: {
447-
enabled: false,
448-
alignment: 'left',
449-
command: StatusBarCommand.DiffWithPrevious,
450-
format: '',
451-
dateFormat: null
452-
},
453-
strings: {
454-
codeLens: {
455-
unsavedChanges: {
456-
recentChangeAndAuthors: '',
457-
recentChangeOnly: '',
458-
authorsOnly: ''
459-
}
460-
}
461-
},
462-
debug: false,
463-
insiders: false,
464-
outputLevel: 'verbose' as OutputLevel,
465-
advanced: {
466-
blame: {
467-
delayAfterEdit: 0,
468-
sizeThresholdAfterEdit: 0
469-
},
470-
caching: {
471-
enabled: false
472-
},
473-
git: '',
474-
maxListItems: 0,
475-
menus: {
476-
explorerContext: {
477-
fileDiff: false,
478-
history: false,
479-
remote: false
480-
},
481-
editorContext: {
482-
blame: false,
483-
copy: false,
484-
details: false,
485-
fileDiff: false,
486-
history: false,
487-
lineDiff: false,
488-
remote: false
489-
},
490-
editorTitle: {
491-
blame: false,
492-
fileDiff: false,
493-
history: false,
494-
status: false
495-
},
496-
editorTitleContext: {
497-
blame: false,
498-
fileDiff: false,
499-
history: false,
500-
remote: false
501-
}
502-
},
503-
messages: {
504-
suppressCommitHasNoPreviousCommitWarning: false,
505-
suppressCommitNotFoundWarning: false,
506-
suppressFileNotUnderSourceControlWarning: false,
507-
suppressGitVersionWarning: false,
508-
suppressLineUncommittedWarning: false,
509-
suppressNoRepositoryWarning: false,
510-
suppressResultsExplorerNotice: false,
511-
suppressUpdateNotice: false,
512-
suppressWelcomeNotice: false
513-
},
514-
quickPick: {
515-
closeOnFocusOut: false
516-
},
517-
repositorySearchDepth: 0,
518-
telemetry: {
519-
enabled: false
520-
}
322+
const emptyObj = {};
323+
const emptyConfig = new Proxy<IConfig>(emptyObj as IConfig, {
324+
get(target, propKey, receiver) {
325+
return emptyObj;
521326
}
522-
};
327+
});
523328

524329
export class Configuration {
525330

0 commit comments

Comments
 (0)