language: Add expression literals

Add expression literals, so you can set properties of type
Gtk.Expression.
This commit is contained in:
James Westman 2024-12-24 12:54:23 -06:00
parent a6d57cebec
commit 02344139c2
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
29 changed files with 268 additions and 21 deletions

View file

@ -177,6 +177,15 @@ def property_completer(lsp, ast_node, match_variables):
docs=prop.doc,
detail=prop.detail,
)
elif prop.type.full_name == "Gtk.Expression":
yield Completion(
prop_name,
CompletionItemKind.Property,
sort_text=f"0 {prop_name}",
snippet=f"{prop_name}: expr $0;",
docs=prop.doc,
detail=prop.detail,
)
else:
yield Completion(
prop_name,