-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
feat: add snacks.nvim picker integration #720
Conversation
Adds a new integration with snacks.nvim to provide a picker interface for selecting prompt actions in CopilotChat. This allows users to open the prompt actions picker with snacks.nvim picker.
Updates the snacks picker integration to properly display previews for each action by adding a preview field to the selection items and configuring the correct preview handler in the picker layout.
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.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (1)
- lua/CopilotChat/integrations/snacks.lua: Language not supported
Change the picker's selection handling from multiple to single item mode by replacing selected() with current() method. This way, only the currently highighted item is picked. Unfortunately, snacks.nvim's picker doesn't support disabling multi-select, so this is a much better implementation.
Added better handling of selected prompts: only the highlighted prompt is selected. Unfortunately, snacks.nvim does not provide a way to disable multi-select (yet), so we still can select multiple prompts. Now, only the highlighted is inserted, making handling much clearer. |
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.
LGTM! Thanks @tku137.
@all-contributors add @tku137 for code. |
I've put up a pull request to add @tku137! 🎉 |
Would it be possible to get docs for this? Blocking AstroNvim/astrocommunity#1333 |
Done here #726 |
Awesome, you guys are amazing |
This adds an integration for the new snacks.nvim picker to be used when picking prompt actions with prompt preview:
