I am a big fun of intellij idea. So i integrate defold api with it.
To use Idea with lua and defold your need.
1)Install lua plugin. EmmyLua https://plugins.jetbrains.com/plugin/9768-emmylua
2)Edit file associations. Press ctrl + shift + a. Then enter command Edit file associations. To lua language add .*script .*render_script .*gui_script.
3)Download defold api library.
I create a tool that parse defold docs and generate lua files with description.
You need download zip file Releases · d954mas/defold-api-emmylua · GitHub
4)Add library to your project.
File/Project structure/libraries/lua zip library.
5)Use it =)
i write scripts, only in idea. Then run game from defold editor. I don’t edit script from defold and from IDEA in same time. If editor not automaticaly reload file, you should make issue for that.
Is there any way to add a warning about using global variables in IDEA? The only thing that I found about it is this issue https://github.com/EmmyLua/IntelliJ-EmmyLua/issues/127 but it’s in Chinese and according to google translate EmmyLua doesn’t support it for now
---Creates a new zero vector with all components set to 0.
- ---@return v vector3 new zero vector
+ ---@return vector3 new zero vector
function vmath.vector3() end
---@param line-break boolean true or false
function gui.set_line_break(node, line-break) end
2)fix luasocket autocompile ("*" as name)
---@param "*" string if address is "*"" and the object is connected, the peer association is removed and
function connected:setpeername("*") end
3)Add timer autocomplite.(i add it by myself. Please add timer doc to docs @sven )
4)make class global. Idea will now autocomplite sprite, spine and etc. Before it autocomplite only their functions
5)Add jar and instruction to generate headers @AGulev
Update:
1)update api to version 1.2.136
2)timer api from from timer_doc.json
No more than 3 consecutive replies are allowed. Please edit your previous reply instead, or wait for someone to reply to you. LOL=) So update prev post.
Update:
1)update api to version 1.2.143
2)autocomplete returned tables(sys.get_sys_info() … )
3)autocomplete url fields(socket, path, fragment)
4)Add this project to asset page. https://www.defold.com/community/projects/128566/