diff --git a/lua/plugins/bqf/init.lua b/lua/plugins/bqf/init.lua index bea82b8..bce7793 100644 --- a/lua/plugins/bqf/init.lua +++ b/lua/plugins/bqf/init.lua @@ -58,8 +58,11 @@ return { dependencies = { { "junegunn/fzf", - build = function() - vim.fn["fzf#install"]() + build = function(plugin) + local result = vim.system({ "./install", "--bin" }, { cwd = plugin.dir }):wait() + if result.code ~= 0 then + error(result.stdout .. result.stderr) + end end, }, }, diff --git a/lua/plugins/diffview.lua b/lua/plugins/diffview.lua index eed55fc..ddc50cb 100644 --- a/lua/plugins/diffview.lua +++ b/lua/plugins/diffview.lua @@ -5,7 +5,6 @@ local M = { vim.opt.fillchars:append({ diff = "╱" }) local actions = require("diffview.actions") local diffview = require("diffview") - local git_helpers = require("git-helpers") -- Diffview changes. Can be used to stage/unstage files. vim.keymap.set("n", "gs", function() @@ -30,6 +29,7 @@ local M = { -- View entire changes versus a specific branch. vim.keymap.set("n", "gdd", function() + local git_helpers = require("git-helpers") git_helpers.branch_input(function(branch) vim.cmd(string.format("DiffviewOpen origin/%s...HEAD -- %s", branch, git_helpers.ignore_paths)) end) @@ -394,6 +394,7 @@ local M = { "n", "go", function() + local git_helpers = require("git-helpers") local hash = git_helpers.get_hash() if hash == nil then return diff --git a/lua/plugins/snacks/changed-files.lua b/lua/plugins/snacks/changed-files.lua index af13c15..d5c8fd6 100644 --- a/lua/plugins/snacks/changed-files.lua +++ b/lua/plugins/snacks/changed-files.lua @@ -1,5 +1,3 @@ -local git_helpers = require("../../git-helpers") - local ChangedFiles = {} ChangedFiles.__index = ChangedFiles @@ -24,6 +22,7 @@ function ChangedFiles:formatted() end function ChangedFiles:get_all() + local git_helpers = require("../../git-helpers") self.all_files = git_helpers.changed_files(self.branch) return self.all_files end