File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ return {
2525 dependencies = {
2626 { " zbirenbaum/copilot.lua" },
2727 { " nvim-lua/plenary.nvim" },
28- { " nvim-telescope/telescope.nvim" },
2928 {
3029 " AstroNvim/astrocore" ,
3130 --- @param opts AstroCoreOpts
@@ -71,9 +70,14 @@ return {
7170 -- Helper function to create mappings
7271 local function create_mapping (action_type , selection_type )
7372 return function ()
74- require (" CopilotChat.integrations.telescope" ).pick (require (" CopilotChat.actions" )[action_type ] {
75- selection = require (" CopilotChat.select" )[selection_type ],
76- })
73+ local fzf_ok = pcall (require , " fzf-lua" )
74+ local snacks_ok = pcall (require , " snacks" )
75+
76+ require (" CopilotChat.integrations." .. (fzf_ok and " fzflua" or snacks_ok and " snacks" or " telescope" )).pick (
77+ require (" CopilotChat.actions" )[action_type ] {
78+ selection = require (" CopilotChat.select" )[selection_type ],
79+ }
80+ )
7781 end
7882 end
7983
You can’t perform that action at this time.
0 commit comments