I wish this to be a feature as well, the only problem i see is if there will be moderation for links in the documentation.
Which could be a problem, but still should be added!!!
local t = {}
t.__index = {}
function t.new()
return setmetatable({
value = 1
}, t)
end
type t = typeof(t.new())
function t.print(self: t, n: number)
pairs("something")
-- I need type t defined here to use it like this
self.value = 2 --> auto completes!
end
t: --> no autocomplete?
I forgot the __index, you’re correct, but that wasn’t the issue.
The community already has a tool like LuaDocs, Moonwave which reads annotations in Luau and generates an entire documentation website from those comments. This is what the community uses, as opposed to LuaDoc which is deprecated and not made with types nor Luau as a language in mind.
The only issue with it is that it doesn’t run in Studio and instead relies on the use of Rojo. But a majority of open-source libraries in the Roblox Open-Source Community already use Rojo and Moonwave to provide documentation among other things.
I haven’t used it, but you might want to check out the EventBlocks plugin: https://create.roblox.com/store/asset/9846495883/. This could be what you were looking for, but it might have limitations and you won’t learn to code from scratch. I just started coding about 2 years ago and still consider myself a novice, so take the suggestion with a grain of salt.