File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed
src/tools/rust-analyzer/editors/code Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 349349 "markdownDescription" : " Whether to show the test explorer." ,
350350 "default" : false ,
351351 "type" : " boolean"
352+ },
353+ "rust-analyzer.initializeStopped" : {
354+ "markdownDescription" : " Do not start rust-analyzer server when the extension is activated." ,
355+ "default" : false ,
356+ "type" : " boolean"
352357 }
353358 }
354359 },
Original file line number Diff line number Diff line change @@ -330,6 +330,10 @@ export class Config {
330330 get statusBarClickAction ( ) {
331331 return this . get < string > ( "statusBar.clickAction" ) ;
332332 }
333+
334+ get initializeStopped ( ) {
335+ return this . get < boolean > ( "initializeStopped" ) ;
336+ }
333337}
334338
335339export function prepareVSCodeConfig < T > ( resp : T ) : T {
Original file line number Diff line number Diff line change @@ -107,7 +107,14 @@ async function activateServer(ctx: Ctx): Promise<RustAnalyzerExtensionApi> {
107107 initializeDebugSessionTrackingAndRebuild ( ctx ) ;
108108 }
109109
110- await ctx . start ( ) ;
110+ if ( ctx . config . initializeStopped ) {
111+ ctx . setServerStatus ( {
112+ health : "stopped" ,
113+ } ) ;
114+ } else {
115+ await ctx . start ( ) ;
116+ }
117+
111118 return ctx ;
112119}
113120
You can’t perform that action at this time.
0 commit comments