lsp: Show better info on IdentLiteral hover

Instead of showing the documentation for the expected type, show the
signature of the referenced object.
This commit is contained in:
James Westman 2023-07-06 21:21:24 -05:00
parent 9ff76b65cc
commit cb1eb9ba44
5 changed files with 41 additions and 6 deletions

View file

@ -35,6 +35,13 @@ class Menu(AstNode):
def id(self) -> str:
return self.tokens["id"]
@property
def signature(self) -> str:
if self.id:
return f"Gio.Menu {self.id}"
else:
return "Gio.Menu"
@property
def tag(self) -> str:
return self.tokens["tag"]