@@ -129,18 +129,24 @@ func (handler *InoHandler) HandleMessageFromIDE(ctx context.Context, conn *jsonr
129
129
handler .synchronizer .DataMux .RUnlock ()
130
130
131
131
case * lsp.DidOpenTextDocumentParams :
132
- // method "textDocument/didOpen":
132
+ // method "textDocument/didOpen"
133
133
uri = p .TextDocument .URI
134
+ log .Printf ("--> didOpen(%s)" , uri )
135
+
134
136
handler .synchronizer .DataMux .Lock ()
135
137
res , err := handler .didOpen (ctx , p )
136
138
handler .synchronizer .DataMux .Unlock ()
139
+
137
140
if res == nil {
138
- log .Println (" notification is not propagated to clangd" )
141
+ log .Println (" --X notification is not propagated to clangd" )
139
142
return nil , err // do not propagate to clangd
140
143
}
144
+
145
+ log .Printf (" --> didOpen(%s)" , res .TextDocument .URI )
141
146
params = res
142
147
143
- case * lsp.CompletionParams : // "textDocument/completion":
148
+ case * lsp.CompletionParams :
149
+ // method: "textDocument/completion"
144
150
uri = p .TextDocument .URI
145
151
log .Printf ("--> completion(%s:%d:%d)\n " , p .TextDocument .URI , p .Position .Line , p .Position .Character )
146
152
@@ -346,7 +352,6 @@ func (handler *InoHandler) didOpen(ctx context.Context, params *lsp.DidOpenTextD
346
352
// Add the TextDocumentItem in the tracked files list
347
353
doc := params .TextDocument
348
354
handler .trackedFiles [doc .URI ] = doc
349
- log .Printf ("--> didOpen(%s)" , doc .URI )
350
355
351
356
// If we are tracking a .ino...
352
357
if doc .URI .AsPath ().Ext () == ".ino" {
@@ -364,7 +369,6 @@ func (handler *InoHandler) didOpen(ctx context.Context, params *lsp.DidOpenTextD
364
369
Version : 1 ,
365
370
},
366
371
}
367
- log .Printf (" message for clangd: didOpen(%s)" , newParam .TextDocument .URI )
368
372
return newParam , err
369
373
}
370
374
}
0 commit comments