@@ -18,11 +18,11 @@ import {
1818 DidChangeTextDocumentParams ,
1919 DidCloseTextDocumentParams ,
2020 DocumentFilter ,
21+ Executable ,
2122 InitializeResult ,
2223 LanguageClient ,
2324 LanguageClientOptions ,
2425 RevealOutputChannelOn ,
25- ServerOptions ,
2626 State ,
2727 StaticFeature ,
2828} from 'vscode-languageclient/node'
@@ -44,6 +44,7 @@ import {
4444import { logger } from './utils/logger'
4545// @ts -ignore
4646import { SemVer } from 'semver'
47+ import { formatCommandExecutionOutput } from './utils/batch'
4748import {
4849 c2pConverter ,
4950 LeanPublishDiagnosticsParams ,
@@ -214,7 +215,7 @@ export class LeanClient implements Disposable {
214215
215216 const progressOptions : ProgressOptions = {
216217 location : ProgressLocation . Notification ,
217- title : '[Server Startup] Starting Lean language client ' ,
218+ title : '[Server Startup] Starting Lean language server and cloning missing packages [(Click for details)](command:lean4.troubleshooting.showOutput) ' ,
218219 cancellable : false ,
219220 }
220221 await window . withProgress (
@@ -542,7 +543,7 @@ export class LeanClient implements Disposable {
542543 return this . running ? this . client ?. initializeResult : undefined
543544 }
544545
545- private async determineServerOptions ( toolchainOverride : string | undefined ) : Promise < ServerOptions > {
546+ private async determineServerOptions ( toolchainOverride : string | undefined ) : Promise < Executable > {
546547 const env = Object . assign ( { } , process . env )
547548 if ( serverLoggingEnabled ( ) ) {
548549 env . LEAN_SERVER_LOG_DIR = serverLoggingPath ( )
@@ -711,9 +712,12 @@ export class LeanClient implements Disposable {
711712 }
712713
713714 private async setupClient ( toolchainOverride : string | undefined ) : Promise < LanguageClient > {
714- const serverOptions : ServerOptions = await this . determineServerOptions ( toolchainOverride )
715+ const serverOptions : Executable = await this . determineServerOptions ( toolchainOverride )
715716 const clientOptions : LanguageClientOptions = this . obtainClientOptions ( )
716717
718+ this . outputChannel . appendLine (
719+ formatCommandExecutionOutput ( serverOptions . options ?. cwd , serverOptions . command , serverOptions . args ?? [ ] ) ,
720+ )
717721 const client = new LanguageClient ( 'lean4' , 'Lean 4' , serverOptions , clientOptions )
718722 const leanCapabilityFeature : StaticFeature = {
719723 initialize ( _1 , _2 ) { } ,
0 commit comments