Provides LuaCATS style type documentation for OpenComputers interfaces and APIs, based on https://ocdoc.cil.li/.
Since a lot of the time you will be importing components via the require('component')
API, type inference will not work.
In those cases, you can easily set the type annotation yourself and enjoy full autocompletion afterwards:
---@type inventory_controller
local inventory_controller = require('component').inventory_controller
- Install the extension
sumneko.lua
https://marketplace.visualstudio.com/items?itemName=sumneko.lua - Configure your workspace settings
.vscode/settings.json
:{ "Lua.workspace.library": [ "path/to/OCLuaTypes/types" ] }
If you find bugs or missing entries in the types, or want to add more editor instructions, feel free to open a PR.