Skip to content

feat: adding Lua plugin support#2625

Open
SirZenith wants to merge 115 commits into
gokcehan:masterfrom
SirZenith:lua
Open

feat: adding Lua plugin support#2625
SirZenith wants to merge 115 commits into
gokcehan:masterfrom
SirZenith:lua

Conversation

@SirZenith

Copy link
Copy Markdown
Contributor

This is Lua plugin support implementation as mentioned in #2616, detail about implementation is written in LUA_DEV.md.

LuaLS meta definition for bindings and module can be found in https://github.com/SirZenith/lf-luals-meta.

SirZenith added 30 commits June 6, 2026 01:11
@SirZenith SirZenith changed the title Adding Lua Plugin Support feat: adding Lua plugin support Jun 22, 2026
@CatsDeservePets

Copy link
Copy Markdown
Collaborator

This PR currently adds 10,572 lines. When running wc -l *go inside lf's repo, I get a total line count of 14,039. This makes me question whether it was written by AI.

Realistically, neither @joelim-work nor I can review such a large PR, let alone maintain it.

I am not against the feature itself, I am just not really sure if this is the way.

@SirZenith

SirZenith commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

No, this is not AI generated. It took me half a month to finish.

Most of its size comes from Lua bindings in lua_binding_*.go and lua_module_*.go, they are simple but take lines of code, basically just exposing existing methods to Lua.

@SirZenith

SirZenith commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Current implementation has a problem. Some bindings call Lua function themself, and this might case dead lock by acquiring Lua state's mutex, which is already occupied by caller of binding function.

And I haven't came up with a good solution yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants