@@ -428,7 +428,7 @@ func (e *Editor) CloseBuffer(ctx context.Context, path string) error {
428
428
429
429
if e .Server != nil {
430
430
if err := e .Server .DidClose (ctx , & protocol.DidCloseTextDocumentParams {
431
- TextDocument : e .textDocumentIdentifier (path ),
431
+ TextDocument : e .TextDocumentIdentifier (path ),
432
432
}); err != nil {
433
433
return fmt .Errorf ("DidClose: %w" , err )
434
434
}
@@ -439,7 +439,7 @@ func (e *Editor) CloseBuffer(ctx context.Context, path string) error {
439
439
return nil
440
440
}
441
441
442
- func (e * Editor ) textDocumentIdentifier (path string ) protocol.TextDocumentIdentifier {
442
+ func (e * Editor ) TextDocumentIdentifier (path string ) protocol.TextDocumentIdentifier {
443
443
return protocol.TextDocumentIdentifier {
444
444
URI : e .sandbox .Workdir .URI (path ),
445
445
}
@@ -471,7 +471,7 @@ func (e *Editor) SaveBufferWithoutActions(ctx context.Context, path string) erro
471
471
includeText = syncOptions .Save .IncludeText
472
472
}
473
473
474
- docID := e .textDocumentIdentifier (buf .path )
474
+ docID := e .TextDocumentIdentifier (buf .path )
475
475
if e .Server != nil {
476
476
if err := e .Server .WillSave (ctx , & protocol.WillSaveTextDocumentParams {
477
477
TextDocument : docID ,
@@ -693,7 +693,7 @@ func (e *Editor) setBufferContentLocked(ctx context.Context, path string, dirty
693
693
params := & protocol.DidChangeTextDocumentParams {
694
694
TextDocument : protocol.VersionedTextDocumentIdentifier {
695
695
Version : int32 (buf .version ),
696
- TextDocumentIdentifier : e .textDocumentIdentifier (buf .path ),
696
+ TextDocumentIdentifier : e .TextDocumentIdentifier (buf .path ),
697
697
},
698
698
ContentChanges : evts ,
699
699
}
@@ -1008,7 +1008,7 @@ func (e *Editor) CodeLens(ctx context.Context, path string) ([]protocol.CodeLens
1008
1008
return nil , fmt .Errorf ("buffer %q is not open" , path )
1009
1009
}
1010
1010
params := & protocol.CodeLensParams {
1011
- TextDocument : e .textDocumentIdentifier (path ),
1011
+ TextDocument : e .TextDocumentIdentifier (path ),
1012
1012
}
1013
1013
lens , err := e .Server .CodeLens (ctx , params )
1014
1014
if err != nil {
@@ -1030,7 +1030,7 @@ func (e *Editor) Completion(ctx context.Context, path string, pos Pos) (*protoco
1030
1030
}
1031
1031
params := & protocol.CompletionParams {
1032
1032
TextDocumentPositionParams : protocol.TextDocumentPositionParams {
1033
- TextDocument : e .textDocumentIdentifier (path ),
1033
+ TextDocument : e .TextDocumentIdentifier (path ),
1034
1034
Position : pos .ToProtocolPosition (),
1035
1035
},
1036
1036
}
@@ -1080,7 +1080,7 @@ func (e *Editor) InlayHint(ctx context.Context, path string) ([]protocol.InlayHi
1080
1080
return nil , fmt .Errorf ("buffer %q is not open" , path )
1081
1081
}
1082
1082
params := & protocol.InlayHintParams {
1083
- TextDocument : e .textDocumentIdentifier (path ),
1083
+ TextDocument : e .TextDocumentIdentifier (path ),
1084
1084
}
1085
1085
hints , err := e .Server .InlayHint (ctx , params )
1086
1086
if err != nil {
@@ -1102,7 +1102,7 @@ func (e *Editor) References(ctx context.Context, path string, pos Pos) ([]protoc
1102
1102
}
1103
1103
params := & protocol.ReferenceParams {
1104
1104
TextDocumentPositionParams : protocol.TextDocumentPositionParams {
1105
- TextDocument : e .textDocumentIdentifier (path ),
1105
+ TextDocument : e .TextDocumentIdentifier (path ),
1106
1106
Position : pos .ToProtocolPosition (),
1107
1107
},
1108
1108
Context : protocol.ReferenceContext {
@@ -1121,7 +1121,7 @@ func (e *Editor) Rename(ctx context.Context, path string, pos Pos, newName strin
1121
1121
return nil
1122
1122
}
1123
1123
params := & protocol.RenameParams {
1124
- TextDocument : e .textDocumentIdentifier (path ),
1124
+ TextDocument : e .TextDocumentIdentifier (path ),
1125
1125
Position : pos .ToProtocolPosition (),
1126
1126
NewName : newName ,
1127
1127
}
@@ -1195,7 +1195,7 @@ func (e *Editor) CodeAction(ctx context.Context, path string, rng *protocol.Rang
1195
1195
return nil , fmt .Errorf ("buffer %q is not open" , path )
1196
1196
}
1197
1197
params := & protocol.CodeActionParams {
1198
- TextDocument : e .textDocumentIdentifier (path ),
1198
+ TextDocument : e .TextDocumentIdentifier (path ),
1199
1199
Context : protocol.CodeActionContext {
1200
1200
Diagnostics : diagnostics ,
1201
1201
},
0 commit comments