@@ -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 ,
@@ -309,7 +310,7 @@ function createProfileSession(
309310 stdio : 'pipe' ,
310311 } ) ;
311312
312- return new LspProfileSession ( child , channel , readVizslaInitializationOptions ) ;
313+ return new LspProfileSession ( child , channel , readDiagnosticsProfilingInitializationOptions ) ;
313314}
314315
315316async function stopProfileSession (
@@ -349,45 +350,8 @@ async function showProfileCompleteMessage(
349350 }
350351}
351352
352- function readVizslaInitializationOptions ( ) : 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- workspace_auto_reload : config . get ( 'workspace.auto.reload' ) ?? true ,
358- scope_visibility : config . get ( 'scope.visibility' ) ?? 'private' ,
359- formatter_provider : config . get ( 'formatter.provider' ) ?? 'verible' ,
360- formatter_path : config . get ( 'formatter.path' ) ?? null ,
361- formatter_args : config . get ( 'formatter.args' ) ?? [ '--failsafe_success=false' ] ,
362- formatting_on_enter : config . get ( 'formatting.on.enter' ) ?? true ,
363- formatting_in_comments : config . get ( 'formatting.in.comments' ) ?? true ,
364- formatting_indent_width : config . get ( 'formatting.indent.width' ) ?? 4 ,
365- inlayHints_port_connection_enable : config . get ( 'inlayHints.port.connection.enable' ) ?? true ,
366- inlayHints_parameter_assignment_enable :
367- config . get ( 'inlayHints.parameter.assignment.enable' ) ?? true ,
368- inlayHints_end_structure_enable : config . get ( 'inlayHints.end.structure.enable' ) ?? true ,
369- lens_instantiations_enable : config . get ( 'lens.instantiations.enable' ) ?? true ,
370- semantic_tokens_port_clk_rst_enable :
371- config . get ( 'semantic.tokens.port.clk.rst.enable' ) ?? true ,
372- semantic_tokens_port_input_output_enable :
373- config . get ( 'semantic.tokens.port.input.output.enable' ) ?? true ,
374- diagnostics : {
375- enable : config . get ( 'diagnostics.enable' ) ?? true ,
376- update : config . get ( 'diagnostics.update' ) ?? 'onSave' ,
377- parse : { enable : config . get ( 'diagnostics.parse.enable' ) ?? true } ,
378- semantic : { enable : config . get ( 'diagnostics.semantic.enable' ) ?? true } ,
379- slang : {
380- warnings : config . get ( 'diagnostics.slang.warnings' ) ?? [ ] ,
381- rules : config . get ( 'diagnostics.slang.rules' ) ?? [ ] ,
382- } ,
383- } ,
384- signature_help_params_only : config . get ( 'signature.help.params.only' ) ?? false ,
385- qihe_command : config . get ( 'qihe.command' ) ?? 'qihe' ,
386- qihe_autoConfigureArgsFromManifest :
387- config . get ( 'qihe.autoConfigureArgsFromManifest' ) ?? true ,
388- qihe_compileArgs : config . get ( 'qihe.compileArgs' ) ?? [ ] ,
389- qihe_runArgs : config . get ( 'qihe.runArgs' ) ?? [ '-g' , 'std' ] ,
390- } ;
353+ function readDiagnosticsProfilingInitializationOptions ( ) : Record < string , unknown > {
354+ return diagnosticsProfilingInitializationOptions ( vscode . workspace . getConfiguration ( 'vizsla' ) ) ;
391355}
392356
393357async function writeJsonFile ( filePath : string , value : unknown ) : Promise < void > {
0 commit comments