-
-
Notifications
You must be signed in to change notification settings - Fork 617
Incompatibility with fugitive and oil.nvim and other plugins #2695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Unfortunately I can't reproduce this one with the clean room above, with :Oil or :G I'm a fugitive user however I haven't seen this one before. I do note that the stack contains lazy - is that the lazy plugin manager? I'm not seeing that in the replication config... |
I deleted |
Those directories apparently appear when saving a special buffer of fugitive or oil.nvim https://www.reddit.com/r/vim/comments/17vpwyw/where_do_the_fugitive_folders_come_from_and_how/ |
I wasn't able to reproduce however the issue is clear. A guard has been added for this case #2696 @pedro757 I'd be most grateful if you reproduced the issue then tested the fix: cd /path/to/nvim-tree.lua
git pull
git checkout origin/2695-git-toplevel-guard-invalid-path When you're finished testing: git checkout master |
Sorry it was my fault, I had this autocommand, that created those directories ( vim.api.nvim_create_autocmd("BufWritePre", {
callback = function()
+ if vim.o.filetype == "oil" or vim.o.filetype == "fugitive" then
+ return
+ end
local dir = vim.fn.expand "<afile>:p:h"
if vim.fn.isdirectory(dir) == 0 then
vim.fn.mkdir(dir, "p")
end
end,
}) Just added those lines to prevent that, thank you |
Description
Neovim version
Operating system and version
Linux 6.1.77-2
Windows variant
No response
nvim-tree version
efafd73
Clean room replication
Steps to reproduce
:G
or:Oil
Expected behavior
Not to error
Actual behavior
The text was updated successfully, but these errors were encountered: