mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-24 17:58:51 +02:00
refactor: check active picker
This commit is contained in:
parent
3b0810c003
commit
f608564517
2 changed files with 16 additions and 17 deletions
|
@ -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
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
local pick = function()
|
||||
if pcall(require, "telescope") then
|
||||
if LazyVim.pick.picker.name == "telescope" then
|
||||
return vim.cmd("Telescope projects")
|
||||
end
|
||||
|
||||
elseif LazyVim.pick.picker.name == "fzf" then
|
||||
local fzf_lua = require("fzf-lua")
|
||||
local history = require("project_nvim.utils.history")
|
||||
local results = history.get_recent_projects()
|
||||
|
@ -15,6 +14,7 @@ local pick = function()
|
|||
},
|
||||
},
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue