mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-06-22 23:19:25 -04:00
lsp: Add reference documentation on hover
For most constructs and keywords, show the relevant section of the reference documentation on hover.
This commit is contained in:
parent
b107a85947
commit
e19975e1f8
28 changed files with 326 additions and 21 deletions
|
@ -124,6 +124,16 @@ class ExtResponse(AstNode):
|
|||
object = self.parent_by_type(Child).object
|
||||
return object.id
|
||||
|
||||
@docs()
|
||||
def ref_docs(self):
|
||||
return get_docs_section("Syntax ExtResponse")
|
||||
|
||||
@docs("response_id")
|
||||
def response_id_docs(self):
|
||||
if enum := self.root.gir.get_type("ResponseType", "Gtk"):
|
||||
if member := enum.members.get(self.response_id, None):
|
||||
return member.doc
|
||||
|
||||
|
||||
def decompile_response_type(parent_element, child_element):
|
||||
obj_id = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue