@@ -2,42 +2,39 @@ import * as vscode from 'vscode'
22import type { Configuration , OutputFormat } from '../types'
33
44export function getConfiguration ( ) : Configuration {
5- const config = vscode . workspace . getConfiguration ( 'dates-le' )
5+ const config = vscode . workspace . getConfiguration ( 'dates-le' )
66
7- return Object . freeze ( {
8- copyToClipboardEnabled : config . get < boolean > ( 'copyToClipboardEnabled' ) ?? false ,
9- dedupeEnabled : config . get < boolean > ( 'dedupeEnabled' ) ?? true ,
10- notificationsLevel :
11- config . get < 'all' | 'important' | 'silent' > ( 'notificationsLevel' ) ?? 'important' ,
12- postProcessOpenInNewFile : config . get < boolean > ( 'postProcessOpenInNewFile' ) ?? false ,
13- openResultsSideBySide : config . get < boolean > ( 'openResultsSideBySide' ) ?? true ,
14- safetyEnabled : config . get < boolean > ( 'safetyEnabled' ) ?? true ,
15- safetyFileSizeWarnBytes : config . get < number > ( 'safetyFileSizeWarnBytes' ) ?? 1048576 ,
16- safetyLargeOutputLinesThreshold : config . get < number > ( 'safetyLargeOutputLinesThreshold' ) ?? 1000 ,
17- safetyManyDocumentsThreshold : config . get < number > ( 'safetyManyDocumentsThreshold' ) ?? 10 ,
18- showParseErrors : config . get < boolean > ( 'showParseErrors' ) ?? true ,
19- statusBarEnabled : config . get < boolean > ( 'statusBarEnabled' ) ?? true ,
20- telemetryEnabled : config . get < boolean > ( 'telemetryEnabled' ) ?? false ,
21- analysisEnabled : config . get < boolean > ( 'analysisEnabled' ) ?? false ,
22- analysisIncludePatterns : config . get < boolean > ( 'analysisIncludePatterns' ) ?? false ,
23- analysisIncludeRanges : config . get < boolean > ( 'analysisIncludeRanges' ) ?? false ,
24- analysisIncludeAnomalies : config . get < boolean > ( 'analysisIncludeAnomalies' ) ?? false ,
25- outputFormat : config . get < OutputFormat > ( 'outputFormat' ) ?? 'iso' ,
26- timezone : config . get < string > ( 'timezone' ) ?? 'UTC' ,
27- performanceEnabled : config . get < boolean > ( 'performanceEnabled' ) ?? false ,
28- performanceMaxDuration : config . get < number > ( 'performanceMaxDuration' ) ?? 5000 ,
29- performanceMaxMemoryUsage : config . get < number > ( 'performanceMaxMemoryUsage' ) ?? 100 ,
30- performanceMaxCpuUsage : config . get < number > ( 'performanceMaxCpuUsage' ) ?? 80 ,
31- performanceMinThroughput : config . get < number > ( 'performanceMinThroughput' ) ?? 1000 ,
32- performanceMaxCacheSize : config . get < number > ( 'performanceMaxCacheSize' ) ?? 100 ,
33- keyboardShortcutsEnabled : config . get < boolean > ( 'keyboardShortcutsEnabled' ) ?? true ,
34- keyboardExtractShortcut : config . get < string > ( 'keyboardExtractShortcut' ) ?? 'ctrl+shift+e' ,
35- keyboardConvertShortcut : config . get < string > ( 'keyboardConvertShortcut' ) ?? 'ctrl+shift+c' ,
36- keyboardAnalyzeShortcut : config . get < string > ( 'keyboardAnalyzeShortcut' ) ?? 'ctrl+shift+a' ,
37- presetsEnabled : config . get < boolean > ( 'presetsEnabled' ) ?? false ,
38- defaultPreset :
39- config . get < 'minimal' | 'balanced' | 'comprehensive' | 'performance' | 'timezone' > (
40- 'defaultPreset' ,
41- ) ?? 'balanced' ,
42- } )
7+ return Object . freeze ( {
8+ copyToClipboardEnabled : config . get < boolean > ( 'copyToClipboardEnabled' ) ?? false ,
9+ dedupeEnabled : config . get < boolean > ( 'dedupeEnabled' ) ?? true ,
10+ notificationsLevel : config . get < 'all' | 'important' | 'silent' > ( 'notificationsLevel' ) ?? 'important' ,
11+ postProcessOpenInNewFile : config . get < boolean > ( 'postProcessOpenInNewFile' ) ?? false ,
12+ openResultsSideBySide : config . get < boolean > ( 'openResultsSideBySide' ) ?? true ,
13+ safetyEnabled : config . get < boolean > ( 'safetyEnabled' ) ?? true ,
14+ safetyFileSizeWarnBytes : config . get < number > ( 'safetyFileSizeWarnBytes' ) ?? 1048576 ,
15+ safetyLargeOutputLinesThreshold : config . get < number > ( 'safetyLargeOutputLinesThreshold' ) ?? 1000 ,
16+ safetyManyDocumentsThreshold : config . get < number > ( 'safetyManyDocumentsThreshold' ) ?? 10 ,
17+ showParseErrors : config . get < boolean > ( 'showParseErrors' ) ?? true ,
18+ statusBarEnabled : config . get < boolean > ( 'statusBarEnabled' ) ?? true ,
19+ telemetryEnabled : config . get < boolean > ( 'telemetryEnabled' ) ?? false ,
20+ analysisEnabled : config . get < boolean > ( 'analysisEnabled' ) ?? false ,
21+ analysisIncludePatterns : config . get < boolean > ( 'analysisIncludePatterns' ) ?? false ,
22+ analysisIncludeRanges : config . get < boolean > ( 'analysisIncludeRanges' ) ?? false ,
23+ analysisIncludeAnomalies : config . get < boolean > ( 'analysisIncludeAnomalies' ) ?? false ,
24+ outputFormat : config . get < OutputFormat > ( 'outputFormat' ) ?? 'iso' ,
25+ timezone : config . get < string > ( 'timezone' ) ?? 'UTC' ,
26+ performanceEnabled : config . get < boolean > ( 'performanceEnabled' ) ?? false ,
27+ performanceMaxDuration : config . get < number > ( 'performanceMaxDuration' ) ?? 5000 ,
28+ performanceMaxMemoryUsage : config . get < number > ( 'performanceMaxMemoryUsage' ) ?? 100 ,
29+ performanceMaxCpuUsage : config . get < number > ( 'performanceMaxCpuUsage' ) ?? 80 ,
30+ performanceMinThroughput : config . get < number > ( 'performanceMinThroughput' ) ?? 1000 ,
31+ performanceMaxCacheSize : config . get < number > ( 'performanceMaxCacheSize' ) ?? 100 ,
32+ keyboardShortcutsEnabled : config . get < boolean > ( 'keyboardShortcutsEnabled' ) ?? true ,
33+ keyboardExtractShortcut : config . get < string > ( 'keyboardExtractShortcut' ) ?? 'ctrl+shift+e' ,
34+ keyboardConvertShortcut : config . get < string > ( 'keyboardConvertShortcut' ) ?? 'ctrl+shift+c' ,
35+ keyboardAnalyzeShortcut : config . get < string > ( 'keyboardAnalyzeShortcut' ) ?? 'ctrl+shift+a' ,
36+ presetsEnabled : config . get < boolean > ( 'presetsEnabled' ) ?? false ,
37+ defaultPreset :
38+ config . get < 'minimal' | 'balanced' | 'comprehensive' | 'performance' | 'timezone' > ( 'defaultPreset' ) ?? 'balanced' ,
39+ } )
4340}
0 commit comments