Skip to content

Commit 31148ad

Browse files
committed
server: fix some methods result type to []LocationLink
1 parent b7d566f commit 31148ad

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

server.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type ServerInterface interface {
2828
Completion(ctx context.Context, params *CompletionParams) (result *CompletionList, err error)
2929
CompletionResolve(ctx context.Context, params *CompletionItem) (result *CompletionItem, err error)
3030
Declaration(ctx context.Context, params *TextDocumentPositionParams) (result []LocationLink, err error)
31-
Definition(ctx context.Context, params *TextDocumentPositionParams) (result []Location, err error)
31+
Definition(ctx context.Context, params *TextDocumentPositionParams) (result []LocationLink, err error)
3232
DidChange(ctx context.Context, params *DidChangeTextDocumentParams) (err error)
3333
DidChangeConfiguration(ctx context.Context, params *DidChangeConfigurationParams) (err error)
3434
DidChangeWatchedFiles(ctx context.Context, params *DidChangeWatchedFilesParams) (err error)
@@ -45,15 +45,15 @@ type ServerInterface interface {
4545
FoldingRanges(ctx context.Context, params *FoldingRangeParams) (result []FoldingRange, err error)
4646
Formatting(ctx context.Context, params *DocumentFormattingParams) (result []TextEdit, err error)
4747
Hover(ctx context.Context, params *TextDocumentPositionParams) (result *Hover, err error)
48-
Implementation(ctx context.Context, params *TextDocumentPositionParams) (result []Location, err error)
48+
Implementation(ctx context.Context, params *TextDocumentPositionParams) (result []LocationLink, err error)
4949
OnTypeFormatting(ctx context.Context, params *DocumentOnTypeFormattingParams) (result []TextEdit, err error)
5050
PrepareRename(ctx context.Context, params *TextDocumentPositionParams) (result *Range, err error)
5151
RangeFormatting(ctx context.Context, params *DocumentRangeFormattingParams) (result []TextEdit, err error)
5252
References(ctx context.Context, params *ReferenceParams) (result []Location, err error)
5353
Rename(ctx context.Context, params *RenameParams) (result []WorkspaceEdit, err error)
5454
SignatureHelp(ctx context.Context, params *TextDocumentPositionParams) (result *SignatureHelp, err error)
5555
Symbols(ctx context.Context, params *WorkspaceSymbolParams) (result []SymbolInformation, err error)
56-
TypeDefinition(ctx context.Context, params *TextDocumentPositionParams) (result []Location, err error)
56+
TypeDefinition(ctx context.Context, params *TextDocumentPositionParams) (result []LocationLink, err error)
5757
WillSave(ctx context.Context, params *WillSaveTextDocumentParams) (err error)
5858
WillSaveWaitUntil(ctx context.Context, params *WillSaveTextDocumentParams) (result []TextEdit, err error)
5959
}
@@ -344,7 +344,7 @@ func (s *Server) Declaration(ctx context.Context, params *TextDocumentPositionPa
344344
// The result type `[]LocationLink` got introduce with version 3.14.0 and depends in the corresponding client capability `clientCapabilities.textDocument.definition.linkSupport`.
345345
//
346346
// Since version 3.14.0.
347-
func (s *Server) Definition(ctx context.Context, params *TextDocumentPositionParams) (result []Location, err error) {
347+
func (s *Server) Definition(ctx context.Context, params *TextDocumentPositionParams) (result []LocationLink, err error) {
348348
s.logger.Debug("call " + MethodTextDocumentDefinition)
349349
defer s.logger.Debug("end " + MethodTextDocumentDefinition)
350350

@@ -514,7 +514,7 @@ func (s *Server) Hover(ctx context.Context, params *TextDocumentPositionParams)
514514
// Implementation sends the request from the client to the server to resolve the implementation location of a symbol at a given text document position.
515515
//
516516
// The result type `[]LocationLink` got introduce with version 3.14.0 and depends in the corresponding client capability `clientCapabilities.implementation.typeDefinition.linkSupport`.
517-
func (s *Server) Implementation(ctx context.Context, params *TextDocumentPositionParams) (result []Location, err error) {
517+
func (s *Server) Implementation(ctx context.Context, params *TextDocumentPositionParams) (result []LocationLink, err error) {
518518
err = s.Conn.Call(ctx, MethodTextDocumentImplementation, params, &result)
519519

520520
return result, err
@@ -577,7 +577,7 @@ func (s *Server) Symbols(ctx context.Context, params *WorkspaceSymbolParams) (re
577577
// The result type `[]LocationLink` got introduce with version 3.14.0 and depends in the corresponding client capability `clientCapabilities.textDocument.typeDefinition.linkSupport`.
578578
//
579579
// Since version 3.6.0.
580-
func (s *Server) TypeDefinition(ctx context.Context, params *TextDocumentPositionParams) (result []Location, err error) {
580+
func (s *Server) TypeDefinition(ctx context.Context, params *TextDocumentPositionParams) (result []LocationLink, err error) {
581581
err = s.Conn.Call(ctx, MethodTextDocumentTypeDefinition, params, &result)
582582

583583
return result, err

0 commit comments

Comments
 (0)