specify direnv v2.33 requirement

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I070fd364adb5d8c64240d8681d8360916a6a6964
This commit is contained in:
raf 2026-01-15 15:13:20 +03:00
commit b9c1cac9a5
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
2 changed files with 18 additions and 7 deletions

View file

@ -1,5 +1,7 @@
# direnv.nvim # direnv.nvim
[direnv]: https://direnv.net/
Dead simple Neovim plugin to add automatic Direnv loading, inspired by Dead simple Neovim plugin to add automatic Direnv loading, inspired by
`direnv.vim` and written in Lua for better performance and maintainability. `direnv.vim` and written in Lua for better performance and maintainability.
@ -15,13 +17,14 @@ Dead simple Neovim plugin to add automatic Direnv loading, inspired by
### 📓 TODO ### 📓 TODO
There are things direnv.nvim can _not_ yet do. Mainly, we would like to `direnv.nvim` is generally feature complete. There are no major planned
integrate Treesitter for **syntax highlighting** similar to direnv.vim. features, and it should be considered stable for the most part. What
Unfortunately there isn't a TS grammar for Direnv, but we can port syntax.vim `direnv.nvim` _cannot_ do yet is **syntax highlighting** similar to `direnv.vim`
from direnv.vim. but this is planned to be remedied through either using Treesitter, or by
porting `direnv.vim`'s syntax.vim.'
Additionally, it might be worth adding an option to allow direnv on, e.g., Feature requests are welcome. Please create an issue to describe the feature
VimEnter if the user has configured to do so. that you would like to see.
## 📦 Installation ## 📦 Installation
@ -31,7 +34,7 @@ You will need to call the setup function to load the plugin.
### Prerequisites ### Prerequisites
- Neovim 0.8.0 or higher - Neovim 0.8.0 or higher
- [direnv](https://direnv.net/) installed and available in your PATH - [direnv] v2.33.0 or later installed and available in your PATH
### Using lazy.nvim ### Using lazy.nvim

View file

@ -164,6 +164,14 @@ M._get_rc_status = function(callback)
local ok, status = pcall(vim.json.decode, obj.stdout) local ok, status = pcall(vim.json.decode, obj.stdout)
if not ok or not status or not status.state then if not ok or not status or not status.state then
vim.schedule(function()
notify(
"Failed to parse direnv status. Your version of direnv may not support JSON output. "
.. "Please ensure you have direnv v2.33.0 or later installed. "
.. "You can verify by running: direnv status --json",
vim.log.levels.ERROR
)
end)
for _, cb in ipairs(pending_callbacks) do for _, cb in ipairs(pending_callbacks) do
cb(nil, nil) cb(nil, nil)
end end