Skip to content
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

[bug] attempt to call field 'nvim_create_augroup' (a nil value) #168

Closed
uolot opened this issue Mar 9, 2022 · 4 comments
Closed

[bug] attempt to call field 'nvim_create_augroup' (a nil value) #168

uolot opened this issue Mar 9, 2022 · 4 comments
Assignees
Labels
assigned Under progress.

Comments

@uolot
Copy link

uolot commented Mar 9, 2022

After updating the plugin minutes ago, I'm now getting the following error:

E5108: Error executing lua ...nvim/plugged/github-nvim-theme/lua/github-theme/util.lua:112: attempt to call field 'nvim_create_augroup' (a nil value)
stack traceback:
        ...nvim/plugged/github-nvim-theme/lua/github-theme/util.lua:112: in function 'autocmds'
        ...nvim/plugged/github-nvim-theme/lua/github-theme/util.lua:232: in function 'load'
        ...nvim/plugged/github-nvim-theme/lua/github-theme/init.lua:15: in function 'setup'
        [string ":lua"]:538: in main chunk

I'm using Plug.vim for managing my plugins, and it pulled the following commits:

  * 7946707 refactor: lua autocmds (47 minutes ago)
  * 715c554 BREAKING_CHANGE: set lualine theme with `theme="auto"` (4 hours ago)
  * 7ed3408 docs: LUALINE.md updated (fixed #167) (5 hours ago)

My neovim details:

$  nvim --version
NVIM v0.6.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@Monterey

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.6.1/share/nvim"

Run :checkhealth for more info
@uolot
Copy link
Author

uolot commented Mar 9, 2022

I can confirm now that the latest commit is the culprit here. After pinning to the previous commit with

Plug 'projekt0n/github-nvim-theme', { 'commit': '715c554' }

the error message doesn't show up anymore.

@sabitm
Copy link

sabitm commented Mar 9, 2022

neovim nightly needed for nvim_create_augroup to work. So either pinning to previous commit or install neovim nightly to solve the issue

@uolot
Copy link
Author

uolot commented Mar 10, 2022

Hey @sabitm thanks for your response. I see you're not a maintainer of this project, so I'd rather wait for a comment from the contributors before migrating to an unstable version of Neovim.

That aside, I have a question to the actual maintainers - @ful1e5 seems to be the main contributor these days and the author of the commit we're discussing. Would you accept a PR with a workaround? My understanding is that all we need is a conditional check for the version of Neovim we're running and then setting the autogroups the old way for line 0.6.x and the new way for 0.7.x, is that correct? If yes, I'm more than happy to contribute.

@ful1e5
Copy link
Member

ful1e5 commented Mar 10, 2022

I reverted 7946707 from upstream temporarily because It's causing more errors. Hopefully in the future, I will manage to add version checking inside util.autocmds function as @uolot mention. Until then, I leave this issue open.

PRs are welcome.

@ful1e5 ful1e5 self-assigned this Mar 14, 2022
@ful1e5 ful1e5 added the assigned Under progress. label Mar 14, 2022
@ful1e5 ful1e5 closed this as completed in 04f5456 Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned Under progress.
Projects
None yet
Development

No branches or pull requests

3 participants