Install vim 9.2.0100_1 with brew install vim, or build from source with Lua 5.5
Any plugin that uses Vim's Lua interface (e.g., vim-lsp, nvim) should work well, but it outputs attempt to call a nil value
Homebrew issue: Homebrew/homebrew-core#271311
Workaround: Homebrew/homebrew-core#271780
9.2.0100
macOS 15.7.4
iTerm2 Build 3.6.8
xterm-256color
zsh 5.9
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I don't really know lua, but claude suggests this fix:
diff --git a/src/if_lua.c b/src/if_lua.c index 364256161..7321af268 100644 --- a/src/if_lua.c +++ b/src/if_lua.c @@ -2431,8 +2431,7 @@ luaV_pushversion(lua_State *L) " -- Note: ignores trailing item without trailing `;`. Not using something\n"\ " -- simpler in order to preserve empty items (stand for default path).\n"\ " local orig = {}\n"\ - " for s in orig_str:gmatch('[^;]*;') do\n"\ - " s = s:sub(1, -2) -- Strip trailing semicolon\n"\ + " for s in orig_str:gmatch('([^;]*);') do\n"\ " orig[#orig + 1] = s\n"\ " end\n"\ " if key == 'path' then\n"\
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Any plugin that uses Vim's Lua interface should work well
This is an apparently common misconception. Lua 5.x versions are explicitly not compatible with each other. The ABIs are different, the syntax of the language changes, etc.
Lua 5.1 / LuaJIT are the common base that most things work with. Adding support for other versions is an explicit choice which must be done every time a new version is released.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Thanks @jamessan , so it's best to roll back the lua dependency of brew vim to 5.4. Should I close the issue?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Don't close this issue, this is valid problem. But it would help if you could check if the suggested fix does - welll - fix it :)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
so it's best to roll back the lua dependency of brew vim to 5.4
Yes. I'd even question why it's using 5.4 in the first place. Most Lua code is going to be compatible with Lua 5.1 / LuaJIT. IMO, that's the safest version to use by default, although having the ability to build with different versions is helpful if people specifically need a different version.
Should I close the issue?
That's up to the Vim maintainers. :) Being able to use Vim with Lua 5.5 probably isn't a bad idea.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Yes. I'd even question why it's using 5.4 in the first place.
I'm not a Homebrew developer, but it seems they prefer the latest stable version.
But it would help if you could check if the suggested fix does - welll - fix it :)
Sure, I've compiled a new one with the patch and it works for me, but I'm not sure if it works in all Lua cases...
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()