From da655a353849bccb73d66dbb3caa9c238e7b0cae Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Sun, 19 Oct 2025 08:42:25 +0300 Subject: [PATCH] fix(lazygit): allow extensible user args (#789) ## Description Currently `opts.args` are set to a specific value. Allow users to optionally pass their own additional args. ## Related Issue(s) None ## Screenshots --- lua/snacks/lazygit.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/snacks/lazygit.lua b/lua/snacks/lazygit.lua index 8657fe61..210f73df 100644 --- a/lua/snacks/lazygit.lua +++ b/lua/snacks/lazygit.lua @@ -215,11 +215,11 @@ function M.log(opts) end -- Opens lazygit with the log of the current file ----@param opts? snacks.lazygit.Config +---@param opts? snacks.lazygit.Config|{} function M.log_file(opts) local file = vim.trim(vim.api.nvim_buf_get_name(0)) opts = opts or {} - opts.args = { "-f", file } + opts.args = vim.list_extend(opts.args or {}, { "-f", file }) opts.cwd = vim.fn.fnamemodify(file, ":h") return M.open(opts) end