From 2f15a11ba2b637a6f1b7635a34aac200668a55f5 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Mon, 23 Dec 2024 19:23:16 +0900 Subject: [PATCH] Add info --- denops/ddu/types.ts | 6 ++++++ doc/ddu.txt | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/denops/ddu/types.ts b/denops/ddu/types.ts index e17f675..fd1849b 100644 --- a/denops/ddu/types.ts +++ b/denops/ddu/types.ts @@ -162,6 +162,11 @@ export type ItemStatus = { time?: number; }; +export type ItemInfo = { + text: string; + hl_group?: string; +}; + export type Item< ActionData extends unknown = unknown, > = { @@ -176,6 +181,7 @@ export type Item< treePath?: TreePath; isExpanded?: boolean; isTree?: boolean; + info?: ItemInfo[]; }; // For internal type diff --git a/doc/ddu.txt b/doc/ddu.txt index d67222b..73f1e24 100644 --- a/doc/ddu.txt +++ b/doc/ddu.txt @@ -1323,6 +1323,18 @@ isTree (boolean) (Optional) The item is tree. NOTE: The attribute must be set to support tree feature. + *ddu-item-attribute-info* +info (object[]) (Optional) + + The list of additional information. + Some UI support the feature. + + text (string) + The additional text. + + hl_group (string) + |:highlight| group. Please see |highlight-groups|. + *ddu-item-attribute-kind* kind (string) (Optional) The kind name.