File tree Expand file tree Collapse file tree 3 files changed +13
-7
lines changed
elixir_ls_debugger/lib/debugger
language_server/lib/language_server
providers/execute_command Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ defmodule ElixirLS.Debugger.Server do
201
201
@ impl GenServer
202
202
def handle_continue ( :disconnect , state = % __MODULE__ { } ) do
203
203
unless Application . get_env ( :elixir_ls_debugger , :test_mode ) do
204
- System . halt ( 0 )
204
+ System . stop ( 0 )
205
205
else
206
206
Process . exit ( self ( ) , { :exit_code , 0 } )
207
207
end
Original file line number Diff line number Diff line change 1
1
defmodule ElixirLS.LanguageServer.Providers.ExecuteCommand.Restart do
2
+ require Logger
3
+
2
4
@ behaviour ElixirLS.LanguageServer.Providers.ExecuteCommand
3
5
4
6
@ impl ElixirLS.LanguageServer.Providers.ExecuteCommand
5
7
def execute ( _args , _state ) do
6
- System . halt ( 0 )
8
+ Task . start ( fn ->
9
+ Logger . info ( "ElixirLS will restart" )
10
+ Process . sleep ( 1000 )
11
+ System . stop ( 0 )
12
+ end )
7
13
end
8
14
end
Original file line number Diff line number Diff line change @@ -337,7 +337,7 @@ defmodule ElixirLS.LanguageServer.Server do
337
337
code = if state . received_shutdown? , do: 0 , else: 1
338
338
339
339
unless Application . get_env ( :language_server , :test_mode ) do
340
- System . halt ( code )
340
+ System . stop ( code )
341
341
else
342
342
Process . exit ( self ( ) , { :exit_code , code } )
343
343
end
@@ -1211,7 +1211,7 @@ defmodule ElixirLS.LanguageServer.Server do
1211
1211
)
1212
1212
1213
1213
Process . sleep ( 5000 )
1214
- System . halt ( 1 )
1214
+ System . stop ( 1 )
1215
1215
end
1216
1216
1217
1217
state
@@ -1226,7 +1226,7 @@ defmodule ElixirLS.LanguageServer.Server do
1226
1226
JsonRpc . show_message ( :warning , "Mix env change detected. ElixirLS will restart." )
1227
1227
1228
1228
Process . sleep ( 5000 )
1229
- System . halt ( 1 )
1229
+ System . stop ( 1 )
1230
1230
end
1231
1231
1232
1232
state
@@ -1249,7 +1249,7 @@ defmodule ElixirLS.LanguageServer.Server do
1249
1249
JsonRpc . show_message ( :warning , "Mix target change detected. ElixirLS will restart" )
1250
1250
1251
1251
Process . sleep ( 5000 )
1252
- System . halt ( 1 )
1252
+ System . stop ( 1 )
1253
1253
end
1254
1254
1255
1255
state
@@ -1285,7 +1285,7 @@ defmodule ElixirLS.LanguageServer.Server do
1285
1285
)
1286
1286
1287
1287
Process . sleep ( 5000 )
1288
- System . halt ( 1 )
1288
+ System . stop ( 1 )
1289
1289
1290
1290
true ->
1291
1291
state
You can’t perform that action at this time.
0 commit comments