Discussion Which tools do you use in your Lua projects?
I'm new to Lua and have found StyLua for formatting and selene for linting. Are these the best options? Are there any other tools I should be using?
10
Upvotes
3
u/Available-Spinach-93 Jul 19 '25
I’m new to Lua also, but have a lot of time in other languages. I’m a Test Driven Development kind of person and I have been using Busted for my unit tests.
1
u/MindScape00 Jul 19 '25 edited Jul 21 '25
Personally I use VSCode with the Lua LS but.. it feels like it took a downgrade in both accuracy / usability & performance over the past couple years so idk. Watching this thread for new alternatives too!
3
u/disperso Jul 23 '25
I will try selene, which for some reason went entirely under my radar (perhaps too new?), but that explains why no one mentioned luacheck. I think it's more well known, and I've seen settings for it in some established open source projects, I think.
I also like to use croissant and rep.lua as alternative REPLs. I also just discovered that rlwrap can wrap really well a bare bones interpreter (e.g. LuaJIT's) and provide history and similar features that I expect from a modern REPL.
The rest would be more libraries than tools. But I want to mention inspect and middleclass as good libraries that I use often. Penlight it's a bit heavy for me, but I like the approach, and sometimes I end up looking for inspiration in its code for smaller/different implementations of same ideas (e.g. the enum one).
2
u/[deleted] Jul 19 '25
VScode e love2d
1
u/Demand_Repulsive Jul 20 '25
Emacs
1
u/lambda_abstraction Jul 21 '25 edited Jul 21 '25
Emacs with lua-mode. Pretty simple, really. I'm not sure it's the best editor for Lua, but after using it for decades, I know where the bones are buried.
1
u/Nyakorita Jul 24 '25
I can't live without EmmyLua! Moved from LLS recently. I use VSCode + EmmyLua
1
u/xoner2 Jul 28 '25
Running the currently loaded script should be one key press in your editor/IDE.
I bind this to f9 key in Emacs...
Building and installing a lua c-extension should be a few lines of lua script.
I've built my own tooling for Lua, mostly in Lua.