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

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).

Incredible work man, you’re doing crazy things on this platform! :rofl:

2 Likes

Bugfix Update:

Shoutout to @cxmeels for finding and reporting issues.

When I added Anchors, I inadvertently introduced two edge cases because anchor behavior is rather different from variable behavior. Having = in an anchor would swallow your subsequent variable, and having : would break that anchor’s formatting.
These issues have been resolved in this patch, along with some minor changes to make it more robust against these types of issues in the future.

2 Likes

Hey, you maybe should consider moving this topic to #resources:community-resources so people can find it easier. Cool creations is mostly meant as a showcase subforum, and not so much as a “this is a tool for you” subforum haha.

Nope, that’s against the rules of the resources category.

Only post resources with a substantial free or open-source component here (code must be open-source). Post paid or closed-source service subscriptions, plugins, and other resources in #help-and-feedback:cool-creations instead.

1 Like

Oh interesting I somehow never heard of that rule before. Guess this is correct :man_shrugging:

This plugin does not support typed lua.

Correct. That’s a totally different language syntax and I have not written a lexer that supports it.

Fair enough, I assume support for Typed lua planned?

Eventually. Typed Lua isn’t really used yet anyway because its still a messy WIP, so there’s no need for me to support it when it’s still changing and evolving.

1 Like

Yeah, thank you for the quick response (Like 4 minutes, do you live on devforum or something?)

I’m in calc class and a bit bored, so yes. You caught me at the right time, that’s all.