Giter Club home page Giter Club logo

Comments (5)

pedro757 avatar pedro757 commented on May 10, 2024 1

Sorry it was my fault, I had this autocommand, that created those directories (oil: and fugitive:) on save.

 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

from nvim-tree.lua.

alex-courtis avatar alex-courtis commented on May 10, 2024

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...
Can you reproduce without lazy?

from nvim-tree.lua.

pedro757 avatar pedro757 commented on May 10, 2024

I deleted oil:/ and fugitive:/ directories and now works fine, no idea why it works now, thank you

from nvim-tree.lua.

pedro757 avatar pedro757 commented on May 10, 2024

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/

from nvim-tree.lua.

alex-courtis avatar alex-courtis commented on May 10, 2024

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

from nvim-tree.lua.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.