scalameta / metals-feature-requests

Issue tracker for Metals feature requests
37 stars 4 forks source link

Add green play button in margin for main methods similar to test run buttons #384

Open bjornregnell opened 7 months ago

bjornregnell commented 7 months ago

Is your feature request related to a problem? Please describe.

It is not always easy to find what can be run and if the project is in error state or actually runable. Sometimes "run | debug" is hidden because of scroll.

Describe the solution you'd like

I really like the green arrow play button in the margin for tests. Could we also have a green arrow play button on @main methods and on the line nbr 1 of .sc scripts? A green margin play button will be easier to spot in a busy window. Also if you activate a .sc script by allowing import of it, the "run | debug" seems to appear hidden above the scroll and I have to scroll on top to see it. If there was a green play button in the margin I'd see it more easily...

image

I got the idea when my .sc had a hidden "run | debug" after re-import...

image

but it's there... I have to scroll but no clue...

image

But the play-button will be attached to the margin of the relevant line. Another thing is that "run | debug" is kind of messing with vertical real estate, but the margin button does not... Also when a file goes from error state to being runable after fixing errors then an appearing green arrow will be a good cue of that it has now changed state from errors to runable Also the @main methods will be easier to spot.

Describe alternatives you've considered

An alternative is to only provide "run | debug" as currently. But a green margin button is easier to spot in a busy window.

Additional context

No response

Search terms

main method, run play button