@@ -92,7 +92,7 @@ func (s *server) Initialize(ctx context.Context, params *protocol.InitializePara
9292
9393 var rootURI span.URI
9494 if params .RootURI != "" {
95- rootURI = span .URI (params .RootURI )
95+ rootURI = span .NewURI (params .RootURI )
9696 }
9797 rootPath , err := rootURI .Filename ()
9898 if err != nil {
@@ -186,7 +186,7 @@ func (s *server) ExecuteCommand(context.Context, *protocol.ExecuteCommandParams)
186186}
187187
188188func (s * server ) DidOpen (ctx context.Context , params * protocol.DidOpenTextDocumentParams ) error {
189- return s .cacheAndDiagnose (ctx , span .URI (params .TextDocument .URI ), params .TextDocument .Text )
189+ return s .cacheAndDiagnose (ctx , span .NewURI (params .TextDocument .URI ), params .TextDocument .Text )
190190}
191191
192192func (s * server ) applyChanges (ctx context.Context , params * protocol.DidChangeTextDocumentParams ) (string , error ) {
@@ -199,7 +199,7 @@ func (s *server) applyChanges(ctx context.Context, params *protocol.DidChangeTex
199199 return change .Text , nil
200200 }
201201
202- file , m , err := newColumnMap (ctx , s .view , span .URI (params .TextDocument .URI ))
202+ file , m , err := newColumnMap (ctx , s .view , span .NewURI (params .TextDocument .URI ))
203203 if err != nil {
204204 return "" , jsonrpc2 .NewErrorf (jsonrpc2 .CodeInternalError , "file not found" )
205205 }
@@ -246,7 +246,7 @@ func (s *server) DidChange(ctx context.Context, params *protocol.DidChangeTextDo
246246 }
247247 text = change .Text
248248 }
249- return s .cacheAndDiagnose (ctx , span .URI (params .TextDocument .URI ), text )
249+ return s .cacheAndDiagnose (ctx , span .NewURI (params .TextDocument .URI ), text )
250250}
251251
252252func (s * server ) WillSave (context.Context , * protocol.WillSaveTextDocumentParams ) error {
@@ -262,12 +262,12 @@ func (s *server) DidSave(context.Context, *protocol.DidSaveTextDocumentParams) e
262262}
263263
264264func (s * server ) DidClose (ctx context.Context , params * protocol.DidCloseTextDocumentParams ) error {
265- s .setContent (ctx , span .URI (params .TextDocument .URI ), nil )
265+ s .setContent (ctx , span .NewURI (params .TextDocument .URI ), nil )
266266 return nil
267267}
268268
269269func (s * server ) Completion (ctx context.Context , params * protocol.CompletionParams ) (* protocol.CompletionList , error ) {
270- f , m , err := newColumnMap (ctx , s .view , span .URI (params .TextDocument .URI ))
270+ f , m , err := newColumnMap (ctx , s .view , span .NewURI (params .TextDocument .URI ))
271271 if err != nil {
272272 return nil , err
273273 }
@@ -294,7 +294,7 @@ func (s *server) CompletionResolve(context.Context, *protocol.CompletionItem) (*
294294}
295295
296296func (s * server ) Hover (ctx context.Context , params * protocol.TextDocumentPositionParams ) (* protocol.Hover , error ) {
297- f , m , err := newColumnMap (ctx , s .view , span .URI (params .TextDocument .URI ))
297+ f , m , err := newColumnMap (ctx , s .view , span .NewURI (params .TextDocument .URI ))
298298 if err != nil {
299299 return nil , err
300300 }
@@ -333,7 +333,7 @@ func (s *server) Hover(ctx context.Context, params *protocol.TextDocumentPositio
333333}
334334
335335func (s * server ) SignatureHelp (ctx context.Context , params * protocol.TextDocumentPositionParams ) (* protocol.SignatureHelp , error ) {
336- f , m , err := newColumnMap (ctx , s .view , span .URI (params .TextDocument .URI ))
336+ f , m , err := newColumnMap (ctx , s .view , span .NewURI (params .TextDocument .URI ))
337337 if err != nil {
338338 return nil , err
339339 }
@@ -353,7 +353,7 @@ func (s *server) SignatureHelp(ctx context.Context, params *protocol.TextDocumen
353353}
354354
355355func (s * server ) Definition (ctx context.Context , params * protocol.TextDocumentPositionParams ) ([]protocol.Location , error ) {
356- f , m , err := newColumnMap (ctx , s .view , span .URI (params .TextDocument .URI ))
356+ f , m , err := newColumnMap (ctx , s .view , span .NewURI (params .TextDocument .URI ))
357357 if err != nil {
358358 return nil , err
359359 }
@@ -385,7 +385,7 @@ func (s *server) Definition(ctx context.Context, params *protocol.TextDocumentPo
385385}
386386
387387func (s * server ) TypeDefinition (ctx context.Context , params * protocol.TextDocumentPositionParams ) ([]protocol.Location , error ) {
388- f , m , err := newColumnMap (ctx , s .view , span .URI (params .TextDocument .URI ))
388+ f , m , err := newColumnMap (ctx , s .view , span .NewURI (params .TextDocument .URI ))
389389 if err != nil {
390390 return nil , err
391391 }
@@ -425,7 +425,7 @@ func (s *server) References(context.Context, *protocol.ReferenceParams) ([]proto
425425}
426426
427427func (s * server ) DocumentHighlight (ctx context.Context , params * protocol.TextDocumentPositionParams ) ([]protocol.DocumentHighlight , error ) {
428- f , m , err := newColumnMap (ctx , s .view , span .URI (params .TextDocument .URI ))
428+ f , m , err := newColumnMap (ctx , s .view , span .NewURI (params .TextDocument .URI ))
429429 if err != nil {
430430 return nil , err
431431 }
@@ -445,7 +445,7 @@ func (s *server) DocumentHighlight(ctx context.Context, params *protocol.TextDoc
445445}
446446
447447func (s * server ) DocumentSymbol (ctx context.Context , params * protocol.DocumentSymbolParams ) ([]protocol.DocumentSymbol , error ) {
448- f , m , err := newColumnMap (ctx , s .view , span .URI (params .TextDocument .URI ))
448+ f , m , err := newColumnMap (ctx , s .view , span .NewURI (params .TextDocument .URI ))
449449 if err != nil {
450450 return nil , err
451451 }
@@ -454,7 +454,7 @@ func (s *server) DocumentSymbol(ctx context.Context, params *protocol.DocumentSy
454454}
455455
456456func (s * server ) CodeAction (ctx context.Context , params * protocol.CodeActionParams ) ([]protocol.CodeAction , error ) {
457- _ , m , err := newColumnMap (ctx , s .view , span .URI (params .TextDocument .URI ))
457+ _ , m , err := newColumnMap (ctx , s .view , span .NewURI (params .TextDocument .URI ))
458458 if err != nil {
459459 return nil , err
460460 }
@@ -509,7 +509,7 @@ func (s *server) Formatting(ctx context.Context, params *protocol.DocumentFormat
509509}
510510
511511func (s * server ) RangeFormatting (ctx context.Context , params * protocol.DocumentRangeFormattingParams ) ([]protocol.TextEdit , error ) {
512- _ , m , err := newColumnMap (ctx , s .view , span .URI (params .TextDocument .URI ))
512+ _ , m , err := newColumnMap (ctx , s .view , span .NewURI (params .TextDocument .URI ))
513513 if err != nil {
514514 return nil , err
515515 }
0 commit comments