Open juru1234 opened 7 months ago
Unable to reproduce with this init.lua
:
local function bootstrap_pckr()
local pckr_path = vim.fn.stdpath("data") .. "/pckr/pckr.nvim"
if not vim.loop.fs_stat(pckr_path) then
vim.fn.system({
'git',
'clone',
"--filter=blob:none",
'https://github.com/lewis6991/pckr.nvim',
pckr_path
})
end
vim.opt.rtp:prepend(pckr_path)
end
bootstrap_pckr()
require('pckr').add{'tpope/vim-commentary'}
nvim --clean -u init.lua
...an/.local/share/nvim/pckr/pckr.nvim/lua/pckr/actions.lua:337
This line is essentially doing:
vim.schedule(function()
coroutine.yield()
end)
With should work in a Neovim built with LuaJIT, see https://luajit.org/extensions.html#resumable
I expect there is something weird going on with your Neovim build, specifically LuaJIT. Did you build from source or via a distribution package? If the latter, then that's likely the cause of the problem.
Thanks for the fast answer. Yes, I'm using the neovim distribution package of Fedora 39 on x86. Then this might be an issue with Fedora's package...
But why is lazy.nvim and other luajit stuff working with the Fedora package?
I don't think lazy.nvim calls coroutine.yield
inside a vim.schedule
callback.
If you use nvim-treesitter
(when it updates to 1.0) or gitsigns.nvim
you'll get the same issue since they use similar async handling code.
For what it's worth, I got the same error but only with neovim 0.10 on an alpine/edge runner, log here.
If I ssh into the runner I can see:
build:~/quark.nvim$ nvim -V1 -v
NVIM v0.10.0
Build type: MinSizeRel
LuaJIT 2.1.1710398010
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Am I to understand that the alpine build restricts some features? It seems that it was built with LuaJIT support.
I would guess it is not built with LuaJIT.
OK, yeah, works on the archlinux runner. Weird that alpine one declares luajit support without providing it but whatever. Should we add a check for luajit then? See :h lua-luajit
, it says there is a lua global jit
that we can check.
Sure.
I wonder if this can be made to work with PUC Lua. We'd need async.lua to work properly.
But yeah, otherwise luajit is required.
nvim --version
: NVIM v0.9.5 LuaJIT 2.1.1692716794git --version
: 2.43.2Steps to reproduce
Use pckr.nvim Quickstart example with one Plugin.
Actual behaviour
Error when calling require('pckr').add{} in init.lua
Expected behaviour
Should work.