Preview Script Pane

You’re off topic within the off topic. Impressive

I don’t see why this is off topic at all. The feature you requested is only beneficial when scripts get really long.

@EchoReaper and @ScrapYard are arguing that you shouldn’t be writing really long scripts to begin with.

1 Like

I actually really like the minimap in Sublime Text. It essentially creates a picture of my code, which helps me visualize it better. I can then quickly navigate to parts of the code that I’ve recognized just by the visual appearance of it on the minimap.

4 Likes

Yay on topic replies!

I would rather have a window where all global members of a module or script are displayed (functions, variables) so that I can double click on them and jump to their definition. Most IDEs have a window like that. I personally wouldn’t really benefit from a script pane, since my scripts never get that long due to proper modularization.

Such as: (Visual Studio 2015)

I’ll make a better image later which is more applicable for Studio if I don’t forget to

4 Likes

Object explorers are only possible for statically typed languages. Lua is dynamically typed.

1 Like

I thought the same for intellisense, but ROBLOX seemed to do that okay.

They could do something really cool where instead of listing the parameter types they could list their actual names (i.e. if I had function test(input1, input2) end it would show up as test(input1, input2)) so that way you don’t lose track of what the parameters do on functions you don’t use that often in your code.

@buildthomas You should probably move that to a different feature request though. Feature requests within feature requests are kind of messy (Unless @ScriptOn wants to change the OP to suggest that seeing as he liked the post) Edit: Then yeah, post it as another thread build.

I like it but don’t see Roblox making it.

I like my idea a bit more. It’s simple and useful.

Plugin, if anyone’s interested:

11 Likes

Sometimes I wish I could like posts more than once. This is super useful, thank you.

Neat, I’ll try that out.

Analyzing dynamic code with accuracy is hard, so intellisense and Lua explorers have to pretend that everything is static. Comprehensive object explorers generally aren’t possible because there’s always that one guy who uses setfenv and screws everything up.

This all probably belongs on a different topic.

1 Like

I agree, the preview minimap is really not that useful and I only keep it around to click through the code quickly. I guess that’s what it’s for though.

It would be 10x as useful to have an analyzed tree, but that’s a very hard problem with Lua. I can’t imagine anyone would approve of directly integrating a feature like that until it can be done perfectly and account for all the weird edge cases that metaprogramming presents.

Intellisense does a pretty good job at predicting variable existence already, surely it wouldn’t be too difficult to, on top of that, make it differentiate between “function” and “variable” and have those results embedded in the explorer window under the Script object, or in a different kind of view.

I don’t think you’d really want to see it filled up with your locals. It’d be more useful if it could interface with some sort of OOP mechanism, but those differ a lot.

edit: And I hope ROBLOX never “forces” a Lua OOP system on its developers…

1 Like

I’ve added this to our internal review list. If we don’t find issues against this, I’ll add it to the Trello voting board and we can see how popular this actually is, no arguing needed!

1 Like

Do you mean the script pane as mentioned in the original post of this thread or also the second idea (object/member-like browser)? If not I can make a separate thread for it for discussion on that.

The former. The latter can be done by using the search function to find the function/variable.

Ah, but that was not the main benefit of having such a window, more for quickly looking up function/variable definitions in modules so you don’t have to open other scripts when coding just to look up definitions. I guess I will make that separate thread with a more detailed explanation of how I think it will be useful later on.

Can you also add better Intellisense/Autocomplete? There’s no auto-complete and Intellisense is really useless aside from writing Enums. I know they’re basically the same thing, but by Intellisense I mean completing something like (Workspace.Part) and by auto-complete I mean if you’ve written a variable name 10 times it gets annoying to keep retyping it, so if it were done automatically (if you press enter) that would be a time saver.