File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 323
323
"command" : " haskell.commands.restartServer" ,
324
324
"title" : " Haskell: Restart Haskell LSP server" ,
325
325
"description" : " Restart the Haskell LSP server"
326
+ },
327
+ {
328
+ "command" : " haskell.commands.startServer" ,
329
+ "title" : " Haskell: Start Haskell LSP server" ,
330
+ "description" : " Start the Haskell LSP server"
331
+ },
332
+ {
333
+ "command" : " haskell.commands.stopServer" ,
334
+ "title" : " Haskell: Stop Haskell LSP server" ,
335
+ "description" : " Stop the Haskell LSP server"
326
336
}
327
337
]
328
338
},
Original file line number Diff line number Diff line change 1
1
export namespace CommandNames {
2
2
export const ImportIdentifierCommandName = 'haskell.commands.importIdentifier' ;
3
3
export const RestartServerCommandName = 'haskell.commands.restartServer' ;
4
+ export const StartServerCommandName = 'haskell.commands.startServer' ;
5
+ export const StopServerCommandName = 'haskell.commands.stopServer' ;
4
6
}
Original file line number Diff line number Diff line change @@ -68,6 +68,26 @@ export async function activate(context: ExtensionContext) {
68
68
69
69
context . subscriptions . push ( restartCmd ) ;
70
70
71
+ const stopCmd = commands . registerCommand ( CommandNames . StopServerCommandName , async ( ) => {
72
+ for ( const langClient of clients . values ( ) ) {
73
+ langClient ?. info ( 'Stopping the client' ) ;
74
+ await langClient ?. stop ( ) ;
75
+ langClient ?. info ( 'Client stopped' ) ;
76
+ }
77
+ } ) ;
78
+
79
+ context . subscriptions . push ( stopCmd ) ;
80
+
81
+ const startCmd = commands . registerCommand ( CommandNames . StartServerCommandName , async ( ) => {
82
+ for ( const langClient of clients . values ( ) ) {
83
+ langClient ?. info ( 'Starting the client' ) ;
84
+ langClient ?. start ( ) ;
85
+ langClient ?. info ( 'Client started' ) ;
86
+ }
87
+ } ) ;
88
+
89
+ context . subscriptions . push ( startCmd ) ;
90
+
71
91
context . subscriptions . push ( ImportIdentifier . registerCommand ( ) ) ;
72
92
73
93
// Set up the documentation browser.
You can’t perform that action at this time.
0 commit comments