Skip to content

Commit

Permalink
Add info
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Dec 23, 2024
1 parent 4b556c3 commit 2f15a11
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions denops/ddu/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ export type ItemStatus = {
time?: number;
};

export type ItemInfo = {
text: string;
hl_group?: string;
};

export type Item<
ActionData extends unknown = unknown,
> = {
Expand All @@ -176,6 +181,7 @@ export type Item<
treePath?: TreePath;
isExpanded?: boolean;
isTree?: boolean;
info?: ItemInfo[];
};

// For internal type
Expand Down
12 changes: 12 additions & 0 deletions doc/ddu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2f15a11

Please sign in to comment.