mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Merge branch 'main' of https://gitlab.gnome.org/jwestman/blueprint-compiler into formatter
This commit is contained in:
commit
b0d6d7a31b
1 changed files with 7 additions and 6 deletions
|
@ -130,11 +130,12 @@ def property_completer(ast_node, match_variables):
|
||||||
matches=[[(TokenType.IDENT, None), (TokenType.OP, ":")]],
|
matches=[[(TokenType.IDENT, None), (TokenType.OP, ":")]],
|
||||||
)
|
)
|
||||||
def prop_value_completer(ast_node, match_variables):
|
def prop_value_completer(ast_node, match_variables):
|
||||||
if isinstance(ast_node.value_type, gir.Enumeration):
|
if (vt := ast_node.value_type) is not None:
|
||||||
for name, member in ast_node.value_type.members.items():
|
if isinstance(vt.value_type, gir.Enumeration):
|
||||||
|
for name, member in vt.value_type.members.items():
|
||||||
yield Completion(name, CompletionItemKind.EnumMember, docs=member.doc)
|
yield Completion(name, CompletionItemKind.EnumMember, docs=member.doc)
|
||||||
|
|
||||||
elif isinstance(ast_node.value_type, gir.BoolType):
|
elif isinstance(vt.value_type, gir.BoolType):
|
||||||
yield Completion("true", CompletionItemKind.Constant)
|
yield Completion("true", CompletionItemKind.Constant)
|
||||||
yield Completion("false", CompletionItemKind.Constant)
|
yield Completion("false", CompletionItemKind.Constant)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue