feat: Add theme options to select Telescope themes#710
feat: Add theme options to select Telescope themes#710deathbeam merged 3 commits intoCopilotC-Nvim:mainfrom Kohei-Wada:main-add-telescope-theme-option
Conversation
|
Thank you @Kohei-Wada for this nice improvement. I like this idea, however, in terms of API (.pick()), I would like to hear @deathbeam thought on this. |
|
I think better way is to just check if .theme is present in opts or not and if present dont call themes.get_dropdown, see how the themes are impleented in telescope: https://github.com/nvim-telescope/telescope.nvim/blob/415af52339215926d705cccc08145f3782c4d132/lua/telescope/themes.lua so you could call .pick(actions, telescope.themes.get_ivy(opts)) etc. This would also allow custom themes that telescope should support in their api |
|
@jellydn @deathbeam actions.prompt_actions({ selection = select.visual }, {
theme = require("telescope.themes").get_cursor({ prompt_prefix = "copilot-chat>" }),
})This change ensures that the theme can be passed directly in the opts parameter, supporting both default and custom themes provided by the Telescope API. Let me know if you have any further suggestions! |
Added theme options to the M.pick function to allow selection of dropdown, ivy, and cursor themes.
Simplified code by removing the theme argument and integrating it into opts.
|
I did not exactly meant it like that, I meant using theme just as a marker as the .get_cursor sets the |
Fixed to apply the default theme when opts and opts.theme are not set.
|
@deathbeam |
|
Looks good, thanks. @all-contributors add @Kohei-Wada for code |
|
I've put up a pull request to add @Kohei-Wada! 🎉 |
Added theme options to the M.pick function to allow selection of dropdown, ivy, and cursor themes.