mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-03-10 09:27:25 +00:00
refactor: check active picker
This commit is contained in:
@@ -11,9 +11,8 @@ return {
|
|||||||
{
|
{
|
||||||
"<leader>p",
|
"<leader>p",
|
||||||
function()
|
function()
|
||||||
local ok, telescope = pcall(require, "telescope")
|
if LazyVim.pick.picker.name == "telescope" then
|
||||||
if ok then
|
require("telescope").extensions.yank_history.yank_history({})
|
||||||
telescope.extensions.yank_history.yank_history({})
|
|
||||||
else
|
else
|
||||||
vim.cmd([[YankyRingHistory]])
|
vim.cmd([[YankyRingHistory]])
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
local pick = function()
|
local pick = function()
|
||||||
if pcall(require, "telescope") then
|
if LazyVim.pick.picker.name == "telescope" then
|
||||||
return vim.cmd("Telescope projects")
|
return vim.cmd("Telescope projects")
|
||||||
end
|
elseif LazyVim.pick.picker.name == "fzf" then
|
||||||
|
|
||||||
local fzf_lua = require("fzf-lua")
|
local fzf_lua = require("fzf-lua")
|
||||||
local history = require("project_nvim.utils.history")
|
local history = require("project_nvim.utils.history")
|
||||||
local results = history.get_recent_projects()
|
local results = history.get_recent_projects()
|
||||||
@@ -16,6 +15,7 @@ local pick = function()
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user