Comments (24)
i'll push a fix when i have some time. I've never used such git feature but will likely do :)
from nvim-tree.lua.
🤔 Just tried to reproduce it in a completely new project that I then turned into a repo but it didn't seem to happen again 😕 not sure how this is happening tbh
from nvim-tree.lua.
Ok, I just looked through my home directory. I unknowingly had a directory literally named $HOME
due to a typo in a configuration causing that variable not to be expanded before creating a directory. Removing that directory resolved the error.
from nvim-tree.lua.
I'll keep this open in the meanwhile :) i could not reproduce de git root error but i had other kind of errors popping in.
from nvim-tree.lua.
i did not manage to reproduce, even with your nvim configuration.
Could you give me the name of the folder in which you try to open neovim so i can see why this is happening ?
from nvim-tree.lua.
Hi @theHamsta @chmln @rickysaurav @Akin909 @marekkon @kyazdani42
i'm running nvim v0.5.0-590-gb39edb5b6
and nvim-tree.lua
in the latest version, i'm able to replicate this issue in long nested path git repositories, below the confusion
directory inside a long nested path throw the error
i
unlike the same confusion
directory inside the home ~
directory
from nvim-tree.lua.
Yep this one is definitely happening I've seen it loads, It seems to happen when you switch directories i.e. project1/buffer1
to project2/bufffer1
if they are in different parts of the file system that seems to cause a big issue
from nvim-tree.lua.
is this still relevant ?
from nvim-tree.lua.
@kyazdani42 I haven't personally seen it since but I also haven't been trying to reproduce it nor have I used the steps @juangabrielr4 mentioned above, but I work in a fairly nested and enormous monorepo and I haven't seen this for at least a day now
from nvim-tree.lua.
allright, we'll leave this open in case it appears again.
from nvim-tree.lua.
@kyazdani42, this error pops up when I'm working in a Git worktree. Saving any files without any changes in a worktree directory is enough to trigger the error.
from nvim-tree.lua.
@gbrlsnchs i did not manage to reproduce the error with a git worktree.
Could you try to make a more detailed step by step way to trigger the error ?
Also which neovim version are you using, and which version of the plugin ?
from nvim-tree.lua.
Got this one again today, the context was I made a new project then initialised it as a git repo from the nvim terminal after having opened lua tree. I saved the session, then whenever I open it again now it errors
Seems to happen specifically BufEnter
when switching buffers, or if I try and interact with the tree at all once the first error appears
from nvim-tree.lua.
Hi! I seem to be experiencing this issue as well:
If I start Neovim from my home directory and try to edit a file anywhere on my system, I get this error each time I try to write the file:
"/tmp/test" [New] 0L, 0C written
Error detected while processing BufWritePost Autocommands for "*":
E5108: Error executing lua .../.config/nvim/dein/.cache/init.vim/.dein/lua/lib/git.lua:67: attempt to concatenate local 'git_root' (a nil value)
Press ENTER or type command to continue
It doesn't matter where the file I'm editing is, whether it's within a git repository or not, or whether it exists or not. The only thing that seems to matter is whether I start vim while my $PWD
is $HOME
. My home directory is not a git repository, nor is it contained within one.
Oddly, if I launch vim from my home directory and :cd
to /tmp/
, the error still occurs upon saving a file. However, if I launch vim from /tmp/
and :cd
to my home directory, the error does not occur.
So far I am not aware of any directory other than my home directory which exhibits this behavior.
Also, it does not matter if LuaTree has been opened or not.
Versions:
-
nvim:
v0.5.0-763-geaee3d929
-
nvim-tree.lua: 87a4d60
from nvim-tree.lua.
ill take a look when if have some time :) thanks for the repro
from nvim-tree.lua.
I cannot reproduce. I thought this issue was fixed long ago, maybe there are some files with characters i don't properly match. I'm not sure wich those are.
from nvim-tree.lua.
Odd. Maybe a workaround would be to check if git_root
is nil
before trying to concatenate it inside M.updateStatus
?
from nvim-tree.lua.
It seems that you're checking git_root
once, then if it's nil
you try to create_root
, but you don't check if it's nil
again after doing so.
So maybe this would work?
local git_root, git_status = get_git_root(cwd)
if not git_root then
if not create_root(cwd) then
return
end
git_root, git_status = get_git_root(cwd)
if not git_root then
return
end
elseif git_status == not_git then
return
end
I haven't looked much into the code, this is just a guess.
Edit: I tested this locally and it seems to have fixed the error.
from nvim-tree.lua.
i know about that, but i like keeping this kind of errors so i can fix the underlying issue. I know this might be caused by a matching gone wrong, but i cannot fix it if i don't have more informations about the filesystem (specially file names that might have weird characters which would cause the lua matching to break).
But i'm working on a big rewrite, and i'll probably use libgit2 which has bindings for lua.
from nvim-tree.lua.
hi, I have some error:
attempt to concatenate local 'git_root' (a nil value)
I test path.
I find my path include '_',this error is happen!
I'm sorry I will not lua to fix this bug,
if you Want more information, tell me ,
oh, I use mac.
from nvim-tree.lua.
nvim/luatree version (commit) ?
underscore is handled, it never was an issue, the problem might come from somewhere else.
Anyway in the next version, it will be handled in a different way that will not require escaping strings, because it won't rely on matching anymore. please check #123 which will normally fix most issues.
from nvim-tree.lua.
yes, not underscore,
I have this error is in web program,
they has node_modules folder,
I delete node_modules
folder, It's not error.
and I checkout rewrite branch, and error too.
from nvim-tree.lua.
please see #123, when it's done, everything will be fixed, i wont spend time on these issues anymore sorry.
from nvim-tree.lua.
from nvim-tree.lua.
Related Issues (20)
- How can I make the nvim-tree display ".. "Folder?
- New git glyph option: 'added' HOT 7
- sync_root_with_cwd appears to be broken HOT 3
- Scrolling downwards is overriden by keymap HOT 3
- Incompatibility with fugitive and oil.nvim and other plugins HOT 5
- An option to control weather change root_folder when root_folder be clicked. HOT 1
- If using floating mode and creating a new file the floating window becomes the created file. HOT 2
- Bookmark filter should include parent directory HOT 1
- Bad contrast for NvimTreeWindowPicker & NvimTreeBookmarkHL on default colorscheme HOT 7
- Mappings/functionality discoverability discussion HOT 10
- update_root won't update with respect_buf_cwd when open file HOT 3
- change_root_to_node() does not work on files HOT 1
- how to use one instance in different tab HOT 2
- Sticky nvim-tree and not using window_picker: How to remember the window where navigating into nvim-tree from?
- Quitting neovim takes a long time when toggling git ignore folders HOT 3
- Add winfixbuf to view options HOT 4
- Provide interface to customize the comparing function between two nodes HOT 1
- 0.10 luadoc and lsp integration
- Parent folder deleted when deleting a folder starting with $ HOT 4
- Make it easy to discover useful shortcuts HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-tree.lua.