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
|
@ -58,6 +58,10 @@ class BindingFlag(AstNode):
|
|||
"Only bindings with a single lookup can have flags",
|
||||
)
|
||||
|
||||
@docs()
|
||||
def ref_docs(self):
|
||||
return get_docs_section("Syntax Binding")
|
||||
|
||||
|
||||
class Binding(AstNode):
|
||||
grammar = [
|
||||
|
@ -99,6 +103,10 @@ class Binding(AstNode):
|
|||
actions=[CodeAction("use 'bind'", "bind")],
|
||||
)
|
||||
|
||||
@docs("bind")
|
||||
def ref_docs(self):
|
||||
return get_docs_section("Syntax Binding")
|
||||
|
||||
|
||||
@dataclass
|
||||
class SimpleBinding:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue