@@ -57,28 +57,6 @@ func (l *LanguageService) ProvideDefinition(ctx context.Context, documentURI lsp
57
57
return l .createLocationsFromDeclarations (declarations ), nil
58
58
}
59
59
60
- // func (l *LanguageService) getMappedDefinition(definitions lsproto.DefinitionResponse) lsproto.DefinitionResponse {
61
- // if definitions.Location != nil {
62
- // definitions.Location = l.getMappedLocation(definitions.Location)
63
- // }
64
- // if definitions.Locations != nil {
65
- // for i, loc := range *definitions.Locations {
66
- // (*definitions.Locations)[i] = *l.getMappedLocation(&loc)
67
- // }
68
- // }
69
- // if definitions.DefinitionLinks != nil {
70
- // for i, link := range *definitions.DefinitionLinks {
71
- // mappedTarget := l.getMappedLocation(&lsproto.Location{Uri: link.TargetUri, Range: link.TargetRange})
72
- // mappedSelection := l.getMappedLocation(&lsproto.Location{Uri: link.TargetUri, Range: link.TargetSelectionRange})
73
- // debug.Assert(mappedTarget.Uri == mappedSelection.Uri, "target and selection should be in same file")
74
- // (*definitions.DefinitionLinks)[i].TargetUri = mappedTarget.Uri
75
- // (*definitions.DefinitionLinks)[i].TargetRange = mappedTarget.Range
76
- // (*definitions.DefinitionLinks)[i].TargetSelectionRange = mappedSelection.Range
77
- // }
78
- // }
79
- // return definitions
80
- // }
81
-
82
60
func (l * LanguageService ) ProvideTypeDefinition (ctx context.Context , documentURI lsproto.DocumentUri , position lsproto.Position ) (lsproto.DefinitionResponse , error ) {
83
61
program , file := l .getProgramAndFile (documentURI )
84
62
node := astnav .GetTouchingPropertyName (file , int (l .converters .LineAndCharacterToPosition (file , position )))
0 commit comments