Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limiting number of suggestions #5

Open
denyago opened this issue Nov 18, 2022 · 2 comments
Open

Limiting number of suggestions #5

denyago opened this issue Nov 18, 2022 · 2 comments

Comments

@denyago
Copy link

denyago commented Nov 18, 2022

How may I limit the number of suggested results?

If I add maxSize: 10 to the configuration, it will not work magically for apparent reasons.

Screenshot 2022-11-18 at 22 16 12

I've tried to add an option --max-results 10 to the fd utility, but get no results at all:

      --max-results <count>
          Limit the number of search results to 'count' and quit immediately.

Screenshot 2022-11-18 at 22 22 07

@denyago
Copy link
Author

denyago commented Nov 19, 2022

I've found a solution myself. Do you think it's worth documenting?

One can see maxItems for the sourceOptions as ddc.vim global config.

Here is my example:

" Change source options
call ddc#custom#patch_global('sourceOptions', #{
      \   around: #{ mark: 'Around here' },
      \   buffer: #{ mark: 'Other Buffers' },
      \   path:   #{
      \     mark: 'Files paths',
      \     maxItems: 10,
      \   },
      \ })

@tani
Copy link
Owner

tani commented Dec 25, 2023

Thank you for the suggestion. It looks fantastic!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants