completions: Sort completion items

This commit is contained in:
James Westman 2025-01-05 14:16:29 -06:00
parent 3cdc3a159c
commit bcb8e4ea14
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
12 changed files with 135 additions and 22 deletions

View file

@ -156,7 +156,10 @@ def complete_adw_message_dialog(_ctx: CompletionContext):
)
def complete_adw_alert_dialog(_ctx: CompletionContext):
yield Completion(
"responses", CompletionItemKind.Keyword, snippet="responses [\n\t$0\n]"
"responses",
CompletionItemKind.Keyword,
snippet="responses [\n\t$0\n]",
sort_text=get_sort_key(CompletionPriority.OBJECT_MEMBER, "responses"),
)