mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -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
|
@ -68,6 +68,10 @@ class GtkDirective(AstNode):
|
|||
# For better error handling, just assume it's 4.0
|
||||
return gir.get_namespace("Gtk", "4.0")
|
||||
|
||||
@docs()
|
||||
def ref_docs(self):
|
||||
return get_docs_section("Syntax GtkDecl")
|
||||
|
||||
|
||||
class Import(AstNode):
|
||||
grammar = Statement(
|
||||
|
@ -105,3 +109,7 @@ class Import(AstNode):
|
|||
return gir.get_namespace(self.tokens["namespace"], self.tokens["version"])
|
||||
except CompileError:
|
||||
return None
|
||||
|
||||
@docs()
|
||||
def ref_docs(self):
|
||||
return get_docs_section("Syntax Using")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue