lsp: Add more "go to reference" implementations

This commit is contained in:
James Westman 2024-10-19 20:44:34 -05:00
parent 94b532bc35
commit f6d05be10b
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
3 changed files with 27 additions and 0 deletions

View file

@ -115,6 +115,17 @@ class AdwBreakpointSetter(AstNode):
self.value.range.text,
)
def get_reference(self, idx: int) -> T.Optional[LocationLink]:
if idx in self.group.tokens["object"].range:
if self.object is not None:
return LocationLink(
self.group.tokens["object"].range,
self.object.range,
self.object.ranges["id"],
)
return None
@context(ValueTypeCtx)
def value_type(self) -> ValueTypeCtx:
if self.gir_property is not None: