File tree 2 files changed +7
-15
lines changed
2 files changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -977,8 +977,8 @@ func (ls *INOLanguageServer) initializedNotifFromIDE(logger jsonrpc.FunctionLogg
977
977
978
978
func (ls * INOLanguageServer ) exitNotifFromIDE (logger jsonrpc.FunctionLogger ) {
979
979
ls .Clangd .conn .Exit ()
980
- logger .Logf ("Arduino Language Server is shutting down ." )
981
- os . Exit ( 0 )
980
+ logger .Logf ("Arduino Language Server is exiting ." )
981
+ ls . Close ( )
982
982
}
983
983
984
984
func (ls * INOLanguageServer ) textDocumentDidOpenNotifFromIDE (logger jsonrpc.FunctionLogger , ideParam * lsp.DidOpenTextDocumentParams ) {
@@ -1381,18 +1381,6 @@ func (ls *INOLanguageServer) Close() {
1381
1381
close (ls .closing )
1382
1382
ls .closing = nil
1383
1383
}
1384
- if ls .buildPath != nil {
1385
- ls .buildPath .RemoveAll ()
1386
- }
1387
- }
1388
-
1389
- // CloseNotify returns a channel that is closed when the InoHandler is closed
1390
- func (ls * INOLanguageServer ) CloseNotify () <- chan bool {
1391
- return ls .closing
1392
- }
1393
-
1394
- // CleanUp performs cleanup of the workspace and temp files create by the language server
1395
- func (ls * INOLanguageServer ) CleanUp () {
1396
1384
if ls .buildPath != nil {
1397
1385
ls .buildPath .RemoveAll ()
1398
1386
ls .buildPath = nil
@@ -1403,6 +1391,11 @@ func (ls *INOLanguageServer) CleanUp() {
1403
1391
}
1404
1392
}
1405
1393
1394
+ // CloseNotify returns a channel that is closed when the InoHandler is closed
1395
+ func (ls * INOLanguageServer ) CloseNotify () <- chan bool {
1396
+ return ls .closing
1397
+ }
1398
+
1406
1399
func (ls * INOLanguageServer ) extractDataFolderFromArduinoCLI (logger jsonrpc.FunctionLogger ) (* paths.Path , error ) {
1407
1400
var dataDir string
1408
1401
if ls .config .CliPath == nil {
Original file line number Diff line number Diff line change @@ -155,6 +155,5 @@ https://microsoft.github.io/language-server-protocol/
155
155
case <- c :
156
156
log .Println ("INTERRUPTED" )
157
157
}
158
- inoHandler .CleanUp ()
159
158
inoHandler .Close ()
160
159
}
You can’t perform that action at this time.
0 commit comments