mirror of
https://github.com/NotAShelf/direnv.nvim.git
synced 2026-04-16 07:14:15 +00:00
Merge pull request #21 from horriblename/fixes
fix: statusline error when called before setup
This commit is contained in:
commit
564146278b
1 changed files with 2 additions and 6 deletions
|
|
@ -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
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue