@@ -5,6 +5,7 @@ import * as path from 'node:path';
55import * as vscode from 'vscode' ;
66
77import { stripProfileArgs } from './profilingArgs' ;
8+ import { diagnosticsProfilingInitializationOptions } from './profilingConfig' ;
89import {
910 type DiagnosticProfileRequest ,
1011 diagnosticsFromProfileResponse ,
@@ -350,22 +351,7 @@ async function showProfileCompleteMessage(
350351}
351352
352353function readDiagnosticsProfilingInitializationOptions ( ) : Record < string , unknown > {
353- const config = vscode . workspace . getConfiguration ( 'vizsla' ) ;
354- return {
355- files_excludeDirs : config . get ( 'files.excludeDirs' ) ?? [ ] ,
356- files_watcher : config . get ( 'files.watcher' ) ?? 'client' ,
357- scope_visibility : config . get ( 'scope.visibility' ) ?? 'private' ,
358- diagnostics : {
359- enable : config . get ( 'diagnostics.enable' ) ?? true ,
360- update : config . get ( 'diagnostics.update' ) ?? 'onSave' ,
361- parse : { enable : config . get ( 'diagnostics.parse.enable' ) ?? true } ,
362- semantic : { enable : config . get ( 'diagnostics.semantic.enable' ) ?? true } ,
363- slang : {
364- warnings : config . get ( 'diagnostics.slang.warnings' ) ?? [ ] ,
365- rules : config . get ( 'diagnostics.slang.rules' ) ?? [ ] ,
366- } ,
367- } ,
368- } ;
354+ return diagnosticsProfilingInitializationOptions ( vscode . workspace . getConfiguration ( 'vizsla' ) ) ;
369355}
370356
371357async function writeJsonFile ( filePath : string , value : unknown ) : Promise < void > {
0 commit comments