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.
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.)
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!
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++.
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.
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.
QoL: Hovering over a listing darkens its background very slightly Requested by @Mullets_Gavin
Bug Fixes: Fixed some serious problems with anonymous functions.
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).
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.
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.
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.