@@ -92,7 +92,7 @@ func (s *server) Initialize(ctx context.Context, params *protocol.InitializePara
92
92
93
93
var rootURI span.URI
94
94
if params .RootURI != "" {
95
- rootURI = span .URI (params .RootURI )
95
+ rootURI = span .NewURI (params .RootURI )
96
96
}
97
97
rootPath , err := rootURI .Filename ()
98
98
if err != nil {
@@ -186,7 +186,7 @@ func (s *server) ExecuteCommand(context.Context, *protocol.ExecuteCommandParams)
186
186
}
187
187
188
188
func (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 )
190
190
}
191
191
192
192
func (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
199
199
return change .Text , nil
200
200
}
201
201
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 ))
203
203
if err != nil {
204
204
return "" , jsonrpc2 .NewErrorf (jsonrpc2 .CodeInternalError , "file not found" )
205
205
}
@@ -246,7 +246,7 @@ func (s *server) DidChange(ctx context.Context, params *protocol.DidChangeTextDo
246
246
}
247
247
text = change .Text
248
248
}
249
- return s .cacheAndDiagnose (ctx , span .URI (params .TextDocument .URI ), text )
249
+ return s .cacheAndDiagnose (ctx , span .NewURI (params .TextDocument .URI ), text )
250
250
}
251
251
252
252
func (s * server ) WillSave (context.Context , * protocol.WillSaveTextDocumentParams ) error {
@@ -262,12 +262,12 @@ func (s *server) DidSave(context.Context, *protocol.DidSaveTextDocumentParams) e
262
262
}
263
263
264
264
func (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 )
266
266
return nil
267
267
}
268
268
269
269
func (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 ))
271
271
if err != nil {
272
272
return nil , err
273
273
}
@@ -294,7 +294,7 @@ func (s *server) CompletionResolve(context.Context, *protocol.CompletionItem) (*
294
294
}
295
295
296
296
func (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 ))
298
298
if err != nil {
299
299
return nil , err
300
300
}
@@ -333,7 +333,7 @@ func (s *server) Hover(ctx context.Context, params *protocol.TextDocumentPositio
333
333
}
334
334
335
335
func (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 ))
337
337
if err != nil {
338
338
return nil , err
339
339
}
@@ -353,7 +353,7 @@ func (s *server) SignatureHelp(ctx context.Context, params *protocol.TextDocumen
353
353
}
354
354
355
355
func (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 ))
357
357
if err != nil {
358
358
return nil , err
359
359
}
@@ -385,7 +385,7 @@ func (s *server) Definition(ctx context.Context, params *protocol.TextDocumentPo
385
385
}
386
386
387
387
func (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 ))
389
389
if err != nil {
390
390
return nil , err
391
391
}
@@ -425,7 +425,7 @@ func (s *server) References(context.Context, *protocol.ReferenceParams) ([]proto
425
425
}
426
426
427
427
func (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 ))
429
429
if err != nil {
430
430
return nil , err
431
431
}
@@ -445,7 +445,7 @@ func (s *server) DocumentHighlight(ctx context.Context, params *protocol.TextDoc
445
445
}
446
446
447
447
func (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 ))
449
449
if err != nil {
450
450
return nil , err
451
451
}
@@ -454,7 +454,7 @@ func (s *server) DocumentSymbol(ctx context.Context, params *protocol.DocumentSy
454
454
}
455
455
456
456
func (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 ))
458
458
if err != nil {
459
459
return nil , err
460
460
}
@@ -509,7 +509,7 @@ func (s *server) Formatting(ctx context.Context, params *protocol.DocumentFormat
509
509
}
510
510
511
511
func (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 ))
513
513
if err != nil {
514
514
return nil , err
515
515
}
0 commit comments