New Script Editor Hover Tips and User-Defined Function Documentation

One of the best roblox studio updates this year!

I have a feature request it would be very neat to be able to actually have code examples in the mini documentation.

It would also be nice to add links so people can go to your documentation site with more information on it.

Like this:

6 Likes

YES!!!

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!!!

Thanks ROBLOX for this awesome update!!!

2 Likes
type table_of_things = {{
Function: typeof(
-- does another thing
function()end
)
}}

should work

2 Likes

type t was defined before t.print was defined

1 Like

I do think you can do this with [](), might not work though

1 Like

defining it after the methods is pointless, I need access to the type within the methods, that’s why I defined it to begin with.

we need a way to have auto complete for the object entries within it’s methods.

1 Like

nvm you just forgot to add __index lmao

2 Likes

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.

2 Likes

Put t.print above the type definition. t can still be accessed inside the method, and youll get autocomplete on print.

2 Likes

This can be shown in the picture I sent earlier

2 Likes

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.

1 Like

YES! What a huge improvement - didn’t even notice this in effect until I had a typechecking issue earlier and saw the improved response.

Will there be support for things such as @param from LuaDoc?

1 Like

New Script Editor Hover Tips and User-Defined Function Documentation - #23 by permanent_fixture

It seems like in the future there will be !

2 Likes

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.

2 Likes

THIS. IS. AMAZING. W ROBLOX and GOOD JOB!

1 Like

We’ll include a fix for this case in a coming release. It’ll be in the release notes when it lands.

3 Likes

This update is amazing however, flexible functions are not possible anymore.

Example:
image

How you used to be able to implement flexiable functions:

Devforum link: Is Flexible Functions Possible?

2 Likes

you should probably close of the a at the start like this:

<a> your text here </a>

1 Like

This is so cool! This makes me want to add tooltips to my own objects i make using OOP. I wonder if they’ll do something like that in the future?

1 Like

A much-needed update. It’s still a long ways off from XML and comparable documentation standards, but a right step forward.

I hope to see better updates, and hopefully improved version control, come to ROBLOX!

So far, I can only get so much information condensed into my documentation, but it’s nice to have there at long last.

3 Likes