mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 08:35:53 +02:00
This commit is contained in:
parent
29829f7eb6
commit
2a608f00d4
1 changed files with 11 additions and 2 deletions
|
@ -9,8 +9,17 @@ function M.pick(kind)
|
||||||
LazyVim.warn("No " .. kind .. " found on the current line")
|
LazyVim.warn("No " .. kind .. " found on the current line")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local ok = pcall(require, "fzf-lua")
|
local map = {
|
||||||
require("CopilotChat.integrations." .. (ok and "fzflua" or "telescope")).pick(items)
|
telescope = "telescope",
|
||||||
|
fzf = "fzflua",
|
||||||
|
snacks = "snacks",
|
||||||
|
}
|
||||||
|
for _, def in pairs(LazyVim.config.get_defaults()) do
|
||||||
|
if def.enabled and map[def.name] then
|
||||||
|
return require("CopilotChat.integrations." .. map[def.name]).pick(items)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Snacks.notify.error("No picker found")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue