ecosse3 / nvim

A non-minimal Neovim config built to work most efficiently with Frontend Development
GNU General Public License v3.0
1.25k stars 110 forks source link

nvim_create_augroup error and keymap error (in git repositories) #35

Closed willdavidow closed 2 years ago

willdavidow commented 2 years ago

Noticing a few issues: one with startup and using nvim_create_augroup and another when selecting files from nvim-tree - the issue with nvim-tree and selecting files appears to be specific to git repositories.

Not sure how you like bug/issue reports (if this is even a bug?) to be submitted, but I don't mind submitting a separate one if that's what you'd prefer... just let me know!

This happens immediately upon startup:

Error detected while processing /Users/my.user.dir/.config/nvim/init.lua:                                                                                    
E5113: Error while calling lua chunk: /Users/my.user.dir/.config/nvim/lua/autocmds.lua:1: attempt to call field 'nvim_create_augroup' (a nil value)          
stack traceback:                                                                                                                                              
        /Users/my.user.dir/.config/nvim/lua/autocmds.lua:1: in main chunk                                                                                    
        [C]: in function 'require'                                                                                                                            
        /Users/my.user.dir/.config/nvim/init.lua:7: in main chunk                                                                                            
Press ENTER or type command to continue   

And this happens when opening a file from a git repository using nvim-tree:

Error executing vim.schedule lua callback: ...ite/pack/packer/opt/gitsigns.nvim/lua/gitsigns/async.lua:68: The coroutine failed with this message: /Users/my.user.dir/.config/nvim/lua/plugi
ns/gitsigns.lua:49: attempt to index field 'keymap' (a nil value)
stack traceback:
        /Users/my.user.dir/.config/nvim/lua/plugins/gitsigns.lua: in function 'map'
        /Users/my.user.dir/.config/nvim/lua/plugins/gitsigns.lua:53: in function 'on_attach'
        ...nvim/site/pack/packer/opt/gitsigns.nvim/lua/gitsigns.lua:282: in function 'attach0'
        ...nvim/site/pack/packer/opt/gitsigns.nvim/lua/gitsigns.lua:344: in function 'attach'
        ...nvim/site/pack/packer/opt/gitsigns.nvim/lua/gitsigns.lua:567: in function <...nvim/site/pack/packer/opt/gitsigns.nvim/lua/gitsigns.lua:505>
stack traceback:
        [C]: in function 'error'
        ...ite/pack/packer/opt/gitsigns.nvim/lua/gitsigns/async.lua:68: in function <...ite/pack/packer/opt/gitsigns.nvim/lua/gitsigns/async.lua:63>
Press ENTER or type command to continue
rajcspsg commented 2 years ago

here is the screenshot of the error https://imgur.com/a/7KC7RNb

ecosse3 commented 2 years ago

About first error of autocmds.lua, what neovim version do you have? nvim_create_augroup is a feature added in nvim 0.7+ so you need the latest version. I didn't have this error.

About second one, is related to gitsigns plugin itself which could be updated for some time. I had this issue once but now it's gone. Do you have this error each time? Check if gitsigns configuration was changed somehow.

willdavidow commented 2 years ago

Ahh, that could be it - I'm running the latest stable version 0.6.1 - I guess this issue will resolve itself when 0.7.x hits the stable channel.

I'll try updating the gitsigns plugin manually to see if that fixes it... I've run the PackerUpdate and PackerSync commands many times, and it has updated things, but still seeing that error with gitsigns.

Thanks!

rajcspsg commented 2 years ago

updating to 0.7-dev build solved all my issues

ecosse3 commented 2 years ago

@willdavidow Does upgrading to 0.7.x also solve the issue for you? Please let me know so then I can close this issue.

willdavidow commented 2 years ago

@ecosse3 Yes, upgrading to 0.7.x fixed it... I'll go ahead and close this.

Thanks!