Merge pull request #21 from horriblename/fixes
Some checks failed
Style & Lint / lint (5.1) (push) Has been cancelled
Style & Lint / style (0.19.1) (push) Has been cancelled

fix: statusline error when called before setup
This commit is contained in:
raf 2026-03-28 07:37:56 +03:00 committed by GitHub
commit 564146278b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -65,11 +65,7 @@ end
--- @param mode string|table Vim mode for the keymap
local function setup_keymaps(keymaps, mode)
for _, map in ipairs(keymaps) do
local options = vim.tbl_extend(
"force",
{ noremap = true, silent = true },
map[3] or {}
)
local options = vim.tbl_extend("force", { silent = true }, map[3] or {})
if map[1] then
vim.keymap.set(mode, map[1], map[2], options)
end
@ -208,7 +204,7 @@ M._get_rc_status = function(callback)
end
vim.system(
{ M.config.bin, "status", "--json" },
{ (M.config or {}).bin or "direnv", "status", "--json" },
{ text = true, cwd = cwd },
on_exit
)