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

Dynamic registration of custom cmdline completion source with docs #876

Open
ibhagwan opened this issue Jan 3, 2025 · 2 comments
Open
Labels
cmdline Related to the command line feature New feature or request

Comments

@ibhagwan
Copy link

ibhagwan commented Jan 3, 2025

Feature Description

Hi again @Saghen and ty for your hard work, you're a machine :-)

Background: when fzf-lua detects nvim-cmp cmdline completion it will register itself as a custom source with docs, this feature is quice nice as it allows the user to see the option they are about to use and it's potential values, etc.

This is how it looks like:
image

image

Apologize in advacne if I missed anything in the docs, how would I go about the entire process of:

  • Registering a custom cmdline source (dynamically at runtime, without having it defined in blink's setup)
  • Adding docs to the custom source so those are displayed with blink
@ibhagwan ibhagwan added the feature New feature or request label Jan 3, 2025
@Saghen Saghen added the cmdline Related to the command line label Jan 3, 2025
@Saghen
Copy link
Owner

Saghen commented Jan 3, 2025

Seems interesting! We have the add_provider method but the user would need to explicitly add the source to their cmdline list, so we need a couple things for this:

  • Ability to show documentation window in cmdline mode (shouldn't be difficult, just need to hook up the redrawing)
  • Ability for plugins to enable a source outside of the user's config

@ibhagwan
Copy link
Author

ibhagwan commented Jan 3, 2025

Ty @Saghen that would be amazing, no rush on this definitely in the “nice to have” category :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmdline Related to the command line feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants