Code Minimap Plugin

Uh…

1 Like

That’s super weird, haven’t seen that before! Will look into it when I get a chance.

Edit: Cannot replicate?
image

Should we maybe take this to DMs to try and fix? We are kindof flooding the thread.

2 Likes

Just bought this, looks like an amazing resource - thanks so much for making it!

If you were looking for ideas on how to expand the tool suite you should definitely add one of these code outlines:

These are so incredibly useful in VS code and I’m astonished nobody has made one for roblox yet! This would make code editing so much easier. Thanks for doing what you do for the community. Plugins may not be more profitable than games (actually maybe they are what do I know lol) but it’s something that drastically changes the quality of games on roblox, whether the creators of those plugins know it or not! I hope all that toxicity from people who want it to be free can be overlooked for the sake of the rest of us who you might not always hear from but we silently appreciate :smile: Boatbomber = the goat.

12 Likes

Important Bugfix Update

Fixed a crucial bug related to line breaks. Big shoutout to @PoliceFighter761 for being my guinea pig and letting me use him to test and solve these issues.

Update your plugins!

6 Likes

Performance Update

It was brought to my attention by @Defaultio that the plugin causes intense lag while typing inside large scripts.

I attacked the issue in a few ways, so hopefully it’ll run well even on your massive scripts.

A) Instead of updating every time you hit a key, it updates ~3 times per second. Keeps it up-to-date enough, without needing to adhere to the unreasonable constraint of running the entire thing in the time it takes you to press a single key.

B) Better caching optimizations, so unchanged tokens (anything prior to where you typed) won’t have as much performance cost now.

C) Massive Lexer level changes to make it handle large scripts better. Better token grouping, fewer token counts, and slightly faster overall. More on that in this thread.

3 Likes

Performance Update

I made the highlighter much smarter about what TextLabels need to be updated, so it avoids all unneeded work. Even in large scripts I’m getting highlight times in 20-40 millisecond ranges!

Previously, it cheaply determined if the token could have theoretically been changed and would refresh it. That lead to refreshes when not really needed. Now, it’s far more aware and can actually determine whether a token has changed. Therefore, typing can often lead to only a single TextLabel out of thousands actually being altered. Monster performance gains!

4 Likes

I found a small issue with the To-Do (and possibly error? doesn’t apply to errors) Highlighting:

1 Like

Adding to this: there are some weird syntax issues I just found:

The string is not highlighted as a string and the comment disappears. Somehow?

1 Like

I see what happens here. The string bracket openers are being mistakenly grouped into the operator token. This is non-trivial to solve, unfortunately. I’ll work on it. Thanks for catching it!

1 Like

Bugfixes

Fixed. Todo markers will disappear properly when you clear the minimap.

Fixed. I kept trying to fix it by designing a pattern, but Lua pattern matching isn’t great at context based stuff. I figured out a way to do it via making brackets a separate pattern from other operators to avoid false grouping.

3 Likes

While looking through CorePackages I discovered this bug:

bug

The minimap completely stopped updating after this.

1 Like

I can’t make the plugin work in areas that Roblox doesn’t allow, but I’ll make it handle the errors more gracefully so it doesn’t break completely. Thanks for finding this!

1 Like

Bug Fix

Plugin will no longer error if you select things that are outside the plugin’s security jurisdiction. Instead, it will simply not display any script source.

4 Likes

Does the current line get highlighted in the minimap as well? Or did I skip over something while reading? Or is this not possible?

Great work nonetheless, while I don’t code within roblox studio anymore there are far more people that do, so this will help them.

too bad it isnt possible to get the minimap within the editor and not as a widget

There’s no API that exposes your cursor or scroll position in the editor, plugins only know what script is being edited.

I talked to the engineers about adding such APIs and it’s not going to happen until after the new script editor is rolled out. (Presumably because it’s not worth adding new features to something that’s about to be replaced)

5 Likes

This is brilliant, thank you. Just heading over to purchase it right now.

1 Like

Just tested this and it seems to not fully be fixed: (Minimap is up to date)

image

1 Like

Good catch, thank you. It is now fixed.

2 Likes

Are there any plans to make the minimap highlight warnings and not just errors?