File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -1056,20 +1056,13 @@ func (ls *INOLanguageServer) initializeWorkbench(logger jsonrpc.FunctionLogger,
10561056 if params == nil {
10571057 // If we are restarting re-synchronize clangd
10581058 cppURI := lsp .NewDocumentURIFromPath (ls .buildSketchCpp )
1059- cppTextDocumentIdentifier := lsp.TextDocumentIdentifier {URI : cppURI }
10601059
1061- syncEvent := & lsp.DidChangeTextDocumentParams {
1062- TextDocument : lsp.VersionedTextDocumentIdentifier {
1063- TextDocumentIdentifier : cppTextDocumentIdentifier ,
1064- Version : ls .sketchMapper .CppText .Version ,
1065- },
1066- ContentChanges : []lsp.TextDocumentContentChangeEvent {
1067- {Text : ls .sketchMapper .CppText .Text }, // Full text change
1068- },
1060+ logger .Logf ("LS --> CL NOTIF textDocument/didSave:" )
1061+ didSaveParams := & lsp.DidSaveTextDocumentParams {
1062+ TextDocument : lsp.TextDocumentIdentifier {URI : cppURI },
1063+ Text : ls .sketchMapper .CppText .Text ,
10691064 }
1070-
1071- logger .Logf ("LS --> CL NOTIF textDocument/didChange:" )
1072- if err := ls .Clangd .conn .TextDocumentDidChange (syncEvent ); err != nil {
1065+ if err := ls .Clangd .conn .TextDocumentDidSave (didSaveParams ); err != nil {
10731066 logger .Logf (" error reinitilizing clangd:" , err )
10741067 return err
10751068 }
You can’t perform that action at this time.
0 commit comments