3 ms·
Luau is gradually typed and has intellisense support? That was my biggest gripe with Love2d, and a huge motivation for why I created the project I haven't yet r
by 90s_dev 1y ago
Luau is gradually typed and has intellisense support? That was my biggest gripe with Love2d, and a huge motivation for why I created the project I haven't yet released! Oh man, I have to check this out.
- james2doyle 1y agoYep. Luau has an LSP so you should be able to get all that. There is no support for Luau in Love2D though. You would have to author your code in Teal (typed lua to lua compiler) and then compile that to Lua to be run in Love: https://github.com/teal-language/tl https://github.com/teal-language/tl You can get the Lua LSP working in Love2D with full completion support by the way. The Lua LSP has 3rd party libraries included in it. You can see all the preinstalled ones here: https://github.com/LuaLS/lua-language-server/tree/master/3rd https://github.com/LuaLS/lua-language-server/tree/master/3rd Support for them as built-ins will be removed at some point though. But you can always add them yourself: https://github.com/LuaLS/lua-language-server/wiki/Settings#workspaceuserthirdparty https://github.com/LuaLS/lua-language-server/wiki/Settings#w... using the files from here: https://github.com/LuaCATS/love2d/ https://github.com/LuaCATS/love2d/ It looks like the easiest way to support them is using a `.luarc.json` file though: https://github.com/LuaLS/lua-language-server/wiki/Configuration-File#luarcjson https://github.com/LuaLS/lua-language-server/wiki/Configurat... Here is a project that is already set up with a config file that you should be able to just copy: https://github.com/jonasgeiler/love2d-joystick-tester/blob/main/.luarc.json https://github.com/jonasgeiler/love2d-joystick-tester/blob/m...