refactor: check active picker

This commit is contained in:
Folke Lemaitre 2024-06-12 23:10:16 +02:00
parent 3b0810c003
commit f608564517
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 16 additions and 17 deletions

View file

@ -11,9 +11,8 @@ return {
{
"<leader>p",
function()
local ok, telescope = pcall(require, "telescope")
if ok then
telescope.extensions.yank_history.yank_history({})
if LazyVim.pick.picker.name == "telescope" then
require("telescope").extensions.yank_history.yank_history({})
else
vim.cmd([[YankyRingHistory]])
end