@@ -357,7 +357,7 @@ func (handler *InoHandler) initializeWorkbench(params *lsp.InitializeParams) err
357357 handler .buildSketchCpp = handler .buildSketchRoot .Join (handler .sketchName + ".ino.cpp" )
358358 handler .buildSketchCppVersion = 1
359359 handler .lspInitializeParams .RootPath = handler .buildSketchRoot .String ()
360- handler .lspInitializeParams .RootURI = lsp .NewDocumenteURIFromPath (handler .buildSketchRoot )
360+ handler .lspInitializeParams .RootURI = lsp .NewDocumentURIFromPath (handler .buildSketchRoot )
361361
362362 if cppContent , err := handler .buildSketchCpp .ReadFile (); err == nil {
363363 handler .sketchMapper = sourcemapper .CreateInoMapper (cppContent )
@@ -371,7 +371,7 @@ func (handler *InoHandler) initializeWorkbench(params *lsp.InitializeParams) err
371371 ctx , cancel := context .WithTimeout (context .Background (), time .Second )
372372 defer cancel ()
373373
374- cppURI := lsp .NewDocumenteURIFromPath (handler .buildSketchCpp )
374+ cppURI := lsp .NewDocumentURIFromPath (handler .buildSketchCpp )
375375 cppTextDocumentIdentifier := lsp.TextDocumentIdentifier {URI : cppURI }
376376
377377 syncEvent := & lsp.DidChangeTextDocumentParams {
@@ -409,7 +409,7 @@ func (handler *InoHandler) initializeWorkbench(params *lsp.InitializeParams) err
409409
410410func (handler * InoHandler ) refreshCppDocumentSymbols () error {
411411 // Query source code symbols
412- cppURI := lsp .NewDocumenteURIFromPath (handler .buildSketchCpp )
412+ cppURI := lsp .NewDocumentURIFromPath (handler .buildSketchCpp )
413413 log .Printf (" --> documentSymbol(%s)" , cppURI )
414414 result , err := lsp .SendRequest (context .Background (), handler .ClangdConn , "textDocument/documentSymbol" , & lsp.DocumentSymbolParams {
415415 TextDocument : lsp.TextDocumentIdentifier {URI : cppURI },
@@ -518,7 +518,7 @@ func (handler *InoHandler) didOpen(ctx context.Context, params *lsp.DidOpenTextD
518518 sketchCpp , err := handler .buildSketchCpp .ReadFile ()
519519 newParam := & lsp.DidOpenTextDocumentParams {
520520 TextDocument : lsp.TextDocumentItem {
521- URI : lsp .NewDocumenteURIFromPath (handler .buildSketchCpp ),
521+ URI : lsp .NewDocumentURIFromPath (handler .buildSketchCpp ),
522522 Text : string (sketchCpp ),
523523 LanguageID : "cpp" ,
524524 Version : handler .buildSketchCppVersion ,
@@ -583,7 +583,7 @@ func (handler *InoHandler) didChange(ctx context.Context, req *lsp.DidChangeText
583583 ContentChanges : cppChanges ,
584584 TextDocument : lsp.VersionedTextDocumentIdentifier {
585585 TextDocumentIdentifier : lsp.TextDocumentIdentifier {
586- URI : lsp .NewDocumenteURIFromPath (handler .buildSketchCpp ),
586+ URI : lsp .NewDocumentURIFromPath (handler .buildSketchCpp ),
587587 },
588588 Version : handler .sketchMapper .CppText .Version ,
589589 },
@@ -659,7 +659,7 @@ func (handler *InoHandler) sketchToBuildPathTextDocumentIdentifier(doc *lsp.Text
659659 newDocFile = handler .buildSketchRoot .JoinPath (rel )
660660 }
661661 log .Printf (" URI: '%s' -> '%s'" , docFile , newDocFile )
662- doc .URI = lsp .NewDocumenteURIFromPath (newDocFile )
662+ doc .URI = lsp .NewDocumentURIFromPath (newDocFile )
663663 return nil
664664}
665665
0 commit comments