Defold API Snippets for Visual Studio Code
Lua & C/C++ API Reference snippets for Defold Engine is available on Visual Studio Marketplace.
Ordered Tabstops
Message Generation
Examples:
Type playsound
and it will generate msg.post(receiver, "play_sound", {[delay], [gain]})
Type modelanimationdone
and it will generate msg.post(receiver, "model_animation_done", {animation_id, playback})
Recommended Settings
Add Defold files.associations
to your settings.json
file.
Setting editor.snippetSuggestions
to bottom
change the order relative to suggestions.
"files.associations": {
"*.script": "lua",
"*.gui_script": "lua",
"*.render_script": "lua",
"*.editor_script": "lua"
},
"editor.snippetSuggestions": "bottom"
Recommended Extension
- EmmyLua (Suggested)
- Lua language support for Visual Studio Code
- Lint Lua scripts with luac or luajit
- Improved Lua syntax highlighting
- Support go to defintion and List Document Symbols.
- Intellisense and Linting for Lua
Json Parser
There is a Python script which download and parse the latest version of the Defold API Reference available on Github repo.