🐛 fix(nvim): yanky options to support fzf-lua
This commit is contained in:
parent
d46545e9bd
commit
b7eb46e0cf
1 changed files with 25 additions and 24 deletions
|
@ -5,10 +5,11 @@ return {
|
||||||
{
|
{
|
||||||
"gbprod/yanky.nvim",
|
"gbprod/yanky.nvim",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
|
opts.highlight = { timer = 250 }
|
||||||
|
|
||||||
|
if LazyVim.has("telescope.nvim") then
|
||||||
local utils = require("yanky.utils")
|
local utils = require("yanky.utils")
|
||||||
local mapping = require("yanky.telescope.mapping")
|
local mapping = require("yanky.telescope.mapping")
|
||||||
|
|
||||||
opts.highlight = { timer = 250 }
|
|
||||||
opts.picker = {
|
opts.picker = {
|
||||||
telescope = {
|
telescope = {
|
||||||
use_default_mappings = false,
|
use_default_mappings = false,
|
||||||
|
@ -29,14 +30,14 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
"<leader>sy",
|
"<leader>sy",
|
||||||
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
|
||||||
|
|
Loading…
Add table
Reference in a new issue