mirror of
https://github.com/NotAShelf/direnv.nvim.git
synced 2024-11-26 18:06:44 +00:00
look for .envrc
before calling direnv
This commit is contained in:
parent
27abc8e721
commit
91558d1edc
1 changed files with 4 additions and 1 deletions
|
@ -57,7 +57,10 @@ M.setup = function(user_config)
|
|||
},
|
||||
}, "n")
|
||||
|
||||
if config.autoload_direnv then
|
||||
-- If user has enabled autoloading, and current directory has an .envrc
|
||||
-- then load it. This has performance implications as it will check for
|
||||
-- a filepath on each BufEnter event.
|
||||
if config.autoload_direnv and vim.fn.glob("**/.envrc") ~= "" then
|
||||
local group_id = vim.api.nvim_create_augroup("DirenvNvim", {})
|
||||
vim.api.nvim_create_autocmd({ "BufEnter" }, {
|
||||
pattern = "*",
|
||||
|
|
Loading…
Reference in a new issue