mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
completions: fix property value completion
This commit is contained in:
parent
bfa2f56e1f
commit
582502c1b4
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, ":")]],
|
||||
)
|
||||
def prop_value_completer(ast_node, match_variables):
|
||||
if isinstance(ast_node.value_type, gir.Enumeration):
|
||||
for name, member in ast_node.value_type.members.items():
|
||||
if (vt := ast_node.value_type) is not None:
|
||||
if isinstance(vt.value_type, gir.Enumeration):
|
||||
for name, member in vt.value_type.members.items():
|
||||
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("false", CompletionItemKind.Constant)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue