-
-
Notifications
You must be signed in to change notification settings - Fork 623
feat: add kind param to vim.ui.select function calls #2602
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
Conversation
This is fantastic, many thanks for identifying this functionality. Let's apply it to all places:
|
We need to document this. Please insert a new help section 10 nvim-tree-prompts Don't be overly concerned about the text - I'll help out once you've got a draft in place. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for your contribution:
- all prompts
- doc
Done with the requested code changes. I've also created the help section for prompts. Do let me know if you think it needs any changes (content or formatting). This is my first time writing vim documentation, so I may have missed out on some syntax (Apologies in advance, if so :) ). |
That's great, tidied a bit and added underscores. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for your contribution!
This PR adds the optional
kind
parameter to thevim.ui.select
function calls.Having this parameter set to something will help in differentiating the
ui.select
prompts ofnvim-tree
from other sources (like LSP code actions or other plugins). This can help in more finer configurations at the user's end. As an example, with this setup I can configurenvim-tree
's select prompts to use the relative to cursor telescope theme, while all other prompts can follow the vertical dropdown telescope theme as default.This does not create any changes in the UI. It only uses an optional parameter that is already present in the
vim.ui
API for this sort of finer configuration.I'm open to changing/discussing the values I've used here. Something more generic (like
nvimtree_action
) or maybe more specific would be fine as well. For my usage, just having some value that tells me its fromnvim-tree
works.For reference, the docs of
vim.ui.select
that referencekind
:Do let me know your thoughts on this. Thanks!