Skip to content

Commit

Permalink
Update FAQ
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Nov 5, 2024
1 parent feb4798 commit 238c1a7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions doc/ddc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1297,6 +1297,9 @@ FAQ 28: |ddc-faq-28|
FAQ 29: |ddc-faq-29|
ddc.vim supports multilines text?

FAQ 30: |ddc-faq-30|
I want to use inline UI when there's single item.


------------------------------------------------------------------------------
*ddc-faq-1*
Expand Down Expand Up @@ -1717,6 +1720,20 @@ You can use the library to implement the feature.

https://github.com/Milly/ddc-unprintable

*ddc-faq-30*
Q: I want to use "inline" UI when there's single item.

A: You can use |ddc-option-dynamicUi| for it. >
args.contextBuilder.patchGlobal({
dynamicUi: (_denops: Denops, args: Record<string, unknown>) => {
const uiArgs = args as {
items: DdcItem[],
};
return Promise.resolve(uiArgs.items.length == 1 ? "inline" : "pum");
},
});
<

==============================================================================
COMPATIBILITY *ddc-compatibility*

Expand Down

0 comments on commit 238c1a7

Please sign in to comment.