nvim: Remove hard-coding to fzf-lua in zk-nvim picker

This commit is contained in:
Marty Oehme 2025-08-23 12:38:45 +02:00
parent c436fe66fd
commit 246c06b60b
Signed by: Marty
GPG key ID: 4E535BC19C61886E

View file

@ -263,6 +263,13 @@ local prose_plugs = {
end
end,
config = function()
local picker = "select"
if require("core.util").is_available("fzf-lua") then
picker = "fzf_lua"
elseif require("core.util").is_available("telescope") then
picker = "telescope"
end
require("zk.commands").add("ZkOrphans", function(opts)
opts = vim.tbl_extend("force", { orphan = true }, opts or {})
require("zk").edit(opts, { title = "Zk Orphans" })
@ -285,21 +292,17 @@ local prose_plugs = {
return collection[path]
end,
}, opts or {})
-- FIXME: Don't hard-code this so much?
-- require("telescope.builtin").live_grep(options)
require("fzf-lua").live_grep(options)
if picker == "telescope" then
require("telescope.builtin").live_grep(options)
elseif picker == "fzf_lua" then
require("fzf-lua").live_grep(options)
end
end)
local picker = "select"
if require("core.util").is_available("fzf-lua") then
picker = "fzf_lua"
elseif require("core.util").is_available("telescope") then
picker = "telescope"
end
require("zk").setup({
picker = picker,
lsp = {
config = {
filetypes = { "markdown", "quarto", "djot" },
filetypes = md_like,
},
auto_attach = {
enabled = true,