fix: fff download if available
This commit is contained in:
1 parent
c64821cb25
commit
14ece88643
3 files changed
+22
-20
No files matched your search
@@ -1,13 +1,13 @@
|
||||
-- snacks.nvim: only picker, lazygit, terminal and image are used.
|
||||
-- fff handles files and grep in the full profile; if its native library was
|
||||
-- not built (or in slim), those maps fall back to snacks.picker.
|
||||
-- not downloaded or built (or in slim), those maps fall back to snacks.picker.
|
||||
local full = vim.g.profile == "full"
|
||||
|
||||
local fff_built
|
||||
local function use_fff()
|
||||
if fff_built == nil then
|
||||
fff_built = false
|
||||
local plugin = full and require("lazy.core.config").plugins["fff.nvim"]
|
||||
local plugin = full and require("lazy.core.config").plugins["fff"]
|
||||
if plugin then
|
||||
local ext = jit.os == "OSX" and "dylib" or "so"
|
||||
fff_built = vim.uv.fs_stat(plugin.dir .. "/target/release/libfff_nvim." .. ext) ~= nil
|
||||
@@ -157,11 +157,13 @@ return {
|
||||
end,
|
||||
},
|
||||
{
|
||||
"dmtrKovalenko/fff.nvim",
|
||||
"dmtrKovalenko/fff",
|
||||
cond = full,
|
||||
lazy = true,
|
||||
-- Only the Lua library; the workspace also has bins that fail to link.
|
||||
build = "cargo build --release -p fff-nvim --lib",
|
||||
-- Downloads the prebuilt library into target/release, falls back to cargo build.
|
||||
build = function()
|
||||
require("fff.download").download_or_build_binary()
|
||||
end,
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user