Code Outline - View your code's variables at a glance

Displays that sample like so:
image

3 Likes

Could you possibly implement a toggle for a dropdown where all the “mini-tables” of that main table are located instead of indexing them using a period and counting them as “seperate” menu table variables?

2 Likes

Thanks for the suggestion, I’ve written it down for future consideration!

Personally, I like it this way because I have a lot of nested tables and I’d prefer to have them all one click away rather than have to waste time expanding dropdowns to get to them.

4 Likes

For the sake of organisation I think a dropdown would keep all my tables on the menu organised and simple, even for the cost of one extra click.

2 Likes

Wow, I always needed this for programming! Thanks for the resource!

1 Like

Love how clean this looks has been something Roblox has been missing for ages.

I’d love to see a few extra features for example:

  • Highlighting a function would display the required arguments. If you want to even go as far as displaying the type information and return types (though could become redudant if Roblox improved their iintellisense)
  • Highlighting a variable will display what it was initialised with.
  • Shift + Click onto the element, rather than navigating to that line it will insert the variable/function on the selected line.
1 Like

Sorry to bother ya again, but I have another suggestions, can you make it so when you one line comment something it will show it in the outline, but instead of it being white text, it will be green, kind of like a headline so I know what section the lines are from.

@Alts_alt
I’m not sure you understand what this plugin is. This isn’t some autofill or intellisense tool to help you write code, it’s a structural tool to help you navigate code so you can work faster and more organized. Additionally, all of your features aren’t possible with Roblox plugins because there are no APIs to get the editor cursor position or display GUIs on top of the editor.

@DarkModule
Manually placed anchors are coming in the next update. :wink:
image

2 Likes

Perfect Also I don’t know if this a bug or not, but there are two Items refering to the same object, its also calling something anonymous function when its not.

Bothing “AnonymousFunction” and MainPluginButton is refering to same object. I think the MainPluginButton is what it meant to show, but instead its showing both.

That’s not a bug, those are two things and it is correctly displaying them!

MainPluginButton is a RBXScriptConnection, and AnonymousFunction is the anonymous function that you passed into the :Connect method.

3 Likes

I want to add anchor points that you can manually define in a comment, so you can essentially use this plugin to “bookmark” spots in your code or label sections in the outline. It’s a very handy feature!

However, I’m not sure on the syntax I want to use. How would you like to mark your comments for the outliner? I want it to be clear, but not bulky or intrusive.

The demo above used --$Outline: Sample Text but that feels a little unwieldly imo.

Anchor Syntax
  • --$Outline: Sample Text
  • --$OL: Sample Text
  • --%O: Sample Text
  • --$Anchor: Sample Text
  • Other (Reply)

0 voters

1 Like

Sorry I possibly didn’t explain my examples good enough as it was quite late for myself last night but what I meant was, if you was to mouseover the variable/function that is listed on your Code Outline Widget it would display a small tooltip of information, rather than having to navigate to that location to view it.

As for the inserting text I’d completely forgotten that the roblox API’s don’t give cursor position and I’d guess you’d run into the issue with larger scripts to where roblox limits how large a string a plugin can insert into a script.

Ohhh that’s actually a neat idea, I’ll add that to my list of possible features. Ty!

Large Performance Update!

Also, manual Anchor outlines!

  • Anchors!

Writing a comment with @outline Sample Text or $Outline: Sample Text will automatically be parsed out into your outline. Of course, you can toggle the visibility of Anchor type listings in the dropdown menu.

This feature is useful for creating “bookmarks” and for labelling sections of your outline!

(I only gave two examples, but you can mark them with many syntaxes, so it should be easy to match your existing comment styles like LuaDocs. You prefix it with any of these symbols: ^ % $ @ !, you can capitalize the O or leave it lowercase, and you can chose to put - or : after it.)

image

  • Performance and internal structure improvements!

It’s quite fast now. I redid a lot of how it works, eliminating a ton of extraneous work whenever possible. I added object pooling, clever table reuse, and redid some of the logical flow to get more done at once.
These optimizations mostly affect continual performance. If you run it on a large script with a couple hundred variables, the first run will take about 60ms (which is still very fast). Subsequent runs will then benefit from the optimizations and take nearer to 20ms!

2 Likes

LOVE IT, Its absolutely Amazing!

How about marking anchors as something roblox already has but doesn’t use? (Documentation nodes, aka - - -). It can help since C::B (An IDE I use) uses that for C and C++.

1 Like

Another big update!

New settings, QoL changes, performance improvements, and bug fixes!

  • Added a plugin setting to highlight your currently open script, or your currently selected script!
    Requested by @cxmeels

  • Added a plugin setting to automatically open/close depending on if you have a script currently being outlined.
    Requested by @Nightrains

  • Added a second dropdown menu for plugin settings to avoid cluttering the main dropdown menu of outline settings.

  • Opening a dropdown menu fades the main window for better focus and clarity.

  • Removes the manual refresh button because refreshes happen so often and it wasted valuable UI space.

  • Created and implemented my new lexer.navigator() for a large performance gain. I also open sourced this new tool here!

  • Fixed an issue where closing and reopening a script would not update the outline until you changed the source code.

3 Likes

Minor change, requested by @Elttob.

Type icon colors are taken from your Studio syntax highlighting, but many people have dull color settings because they use a darker background than the plugin window, which leads to poor contrast in the outliner.

I have now made it take your syntax colors, convert to HSV, increase the S, and then use that.

Left is old, right is new. It’s subtle, but makes it much easier to see icons and differentiate at a glance.

5 Likes

Update!

Tooltip data, QoL improvements, and bug fixes

  • Tooltip: Hovering over a listing for a moment will bring up a popup label that gives additional info about the listing.
    Requested by @Alts_alt
    All listings will have the line number in the tooltip. Functions will have their expected parameters in the tooltip. Known types will have their initial value in the tooltip.
    image image

  • QoL: Hovering over a listing darkens its background very slightly
    Requested by @Mullets_Gavin
    image

  • Bug Fixes: Fixed some serious problems with anonymous functions.

9 Likes

After reviewing the plugin again, I noticed the lack of ability to filter out wide ranges of lines. If possible, could you add a feature where you can filter out a range of lines (e.g. 4-50) and apply them using a button next to the textbox. Making the filters editable would also be pretty amazing.

If you don’t know what I mean by filtering, I am basically saying to remove everything on the plugin ui that is located within the filtered line(s).