@@ -357,7 +357,7 @@ func (handler *InoHandler) initializeWorkbench(params *lsp.InitializeParams) err
357
357
handler .buildSketchCpp = handler .buildSketchRoot .Join (handler .sketchName + ".ino.cpp" )
358
358
handler .buildSketchCppVersion = 1
359
359
handler .lspInitializeParams .RootPath = handler .buildSketchRoot .String ()
360
- handler .lspInitializeParams .RootURI = lsp .NewDocumenteURIFromPath (handler .buildSketchRoot )
360
+ handler .lspInitializeParams .RootURI = lsp .NewDocumentURIFromPath (handler .buildSketchRoot )
361
361
362
362
if cppContent , err := handler .buildSketchCpp .ReadFile (); err == nil {
363
363
handler .sketchMapper = sourcemapper .CreateInoMapper (cppContent )
@@ -371,7 +371,7 @@ func (handler *InoHandler) initializeWorkbench(params *lsp.InitializeParams) err
371
371
ctx , cancel := context .WithTimeout (context .Background (), time .Second )
372
372
defer cancel ()
373
373
374
- cppURI := lsp .NewDocumenteURIFromPath (handler .buildSketchCpp )
374
+ cppURI := lsp .NewDocumentURIFromPath (handler .buildSketchCpp )
375
375
cppTextDocumentIdentifier := lsp.TextDocumentIdentifier {URI : cppURI }
376
376
377
377
syncEvent := & lsp.DidChangeTextDocumentParams {
@@ -409,7 +409,7 @@ func (handler *InoHandler) initializeWorkbench(params *lsp.InitializeParams) err
409
409
410
410
func (handler * InoHandler ) refreshCppDocumentSymbols () error {
411
411
// Query source code symbols
412
- cppURI := lsp .NewDocumenteURIFromPath (handler .buildSketchCpp )
412
+ cppURI := lsp .NewDocumentURIFromPath (handler .buildSketchCpp )
413
413
log .Printf (" --> documentSymbol(%s)" , cppURI )
414
414
result , err := lsp .SendRequest (context .Background (), handler .ClangdConn , "textDocument/documentSymbol" , & lsp.DocumentSymbolParams {
415
415
TextDocument : lsp.TextDocumentIdentifier {URI : cppURI },
@@ -518,7 +518,7 @@ func (handler *InoHandler) didOpen(ctx context.Context, params *lsp.DidOpenTextD
518
518
sketchCpp , err := handler .buildSketchCpp .ReadFile ()
519
519
newParam := & lsp.DidOpenTextDocumentParams {
520
520
TextDocument : lsp.TextDocumentItem {
521
- URI : lsp .NewDocumenteURIFromPath (handler .buildSketchCpp ),
521
+ URI : lsp .NewDocumentURIFromPath (handler .buildSketchCpp ),
522
522
Text : string (sketchCpp ),
523
523
LanguageID : "cpp" ,
524
524
Version : handler .buildSketchCppVersion ,
@@ -583,7 +583,7 @@ func (handler *InoHandler) didChange(ctx context.Context, req *lsp.DidChangeText
583
583
ContentChanges : cppChanges ,
584
584
TextDocument : lsp.VersionedTextDocumentIdentifier {
585
585
TextDocumentIdentifier : lsp.TextDocumentIdentifier {
586
- URI : lsp .NewDocumenteURIFromPath (handler .buildSketchCpp ),
586
+ URI : lsp .NewDocumentURIFromPath (handler .buildSketchCpp ),
587
587
},
588
588
Version : handler .sketchMapper .CppText .Version ,
589
589
},
@@ -659,7 +659,7 @@ func (handler *InoHandler) sketchToBuildPathTextDocumentIdentifier(doc *lsp.Text
659
659
newDocFile = handler .buildSketchRoot .JoinPath (rel )
660
660
}
661
661
log .Printf (" URI: '%s' -> '%s'" , docFile , newDocFile )
662
- doc .URI = lsp .NewDocumenteURIFromPath (newDocFile )
662
+ doc .URI = lsp .NewDocumentURIFromPath (newDocFile )
663
663
return nil
664
664
}
665
665
0 commit comments