File tree Expand file tree Collapse file tree 2 files changed +7
-15
lines changed Expand file tree Collapse file tree 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
977977
978978func (ls * INOLanguageServer ) exitNotifFromIDE (logger jsonrpc.FunctionLogger ) {
979979 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 ( )
982982}
983983
984984func (ls * INOLanguageServer ) textDocumentDidOpenNotifFromIDE (logger jsonrpc.FunctionLogger , ideParam * lsp.DidOpenTextDocumentParams ) {
@@ -1381,18 +1381,6 @@ func (ls *INOLanguageServer) Close() {
13811381 close (ls .closing )
13821382 ls .closing = nil
13831383 }
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 () {
13961384 if ls .buildPath != nil {
13971385 ls .buildPath .RemoveAll ()
13981386 ls .buildPath = nil
@@ -1403,6 +1391,11 @@ func (ls *INOLanguageServer) CleanUp() {
14031391 }
14041392}
14051393
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+
14061399func (ls * INOLanguageServer ) extractDataFolderFromArduinoCLI (logger jsonrpc.FunctionLogger ) (* paths.Path , error ) {
14071400 var dataDir string
14081401 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/
155155 case <- c :
156156 log .Println ("INTERRUPTED" )
157157 }
158- inoHandler .CleanUp ()
159158 inoHandler .Close ()
160159}
You can’t perform that action at this time.
0 commit comments