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:
James Westman 2024-10-19 18:46:10 -05:00
parent b107a85947
commit e19975e1f8
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
28 changed files with 326 additions and 21 deletions

View file

@ -57,7 +57,7 @@ class ExtStringListStrings(AstNode):
self.group.tokens["strings"].range,
)
@validate("items")
@validate("strings")
def container_is_string_list(self):
validate_parent_type(self, "Gtk", "StringList", "StringList items")
@ -65,6 +65,10 @@ class ExtStringListStrings(AstNode):
def unique_in_parent(self):
self.validate_unique_in_parent("Duplicate strings block")
@docs("strings")
def ref_docs(self):
return get_docs_section("Syntax ExtStringListStrings")
@completer(
applies_in=[ObjectContent],