File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,14 @@ import vscode from 'vscode'
77import { startLanguageServer } from './client'
88import { AmazonQLSPResolver } from './lspInstaller'
99import { ToolkitError } from 'aws-core-vscode/shared'
10+ import { lspSetupStage } from 'aws-core-vscode/amazonq'
1011
1112export async function activate ( ctx : vscode . ExtensionContext ) : Promise < void > {
1213 try {
13- const installResult = await new AmazonQLSPResolver ( ) . resolve ( )
14- await startLanguageServer ( ctx , installResult . resourcePaths )
14+ await lspSetupStage ( 'all' , async ( ) => {
15+ const installResult = await new AmazonQLSPResolver ( ) . resolve ( )
16+ await lspSetupStage ( 'launch' , async ( ) => await startLanguageServer ( ctx , installResult . resourcePaths ) )
17+ } )
1518 } catch ( err ) {
1619 const e = err as ToolkitError
1720 void vscode . window . showInformationMessage ( `Unable to launch amazonq language server: ${ e . message } ` )
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export {
1717} from './onboardingPage/walkthrough'
1818export { LspController } from './lsp/lspController'
1919export { LspClient } from './lsp/lspClient'
20+ export { lspSetupStage } from './lsp/util'
2021export { api } from './extApi'
2122export { AmazonQChatViewProvider } from './webview/webView'
2223export { init as cwChatAppInit } from '../codewhispererChat/app'
You can’t perform that action at this time.
0 commit comments