Closed mfontanini closed 1 month ago
@mfontanini Matias, first of all: great project, I'm using it heavily! I would love to contribute, but my rust skills are null
.
So here's my suggestion for this feature:
Without +line_numbers
▶ #include <stdio.h>
int main() {
int arr[3] = {1, 2, 3};
int value = arr[5]; // Accessing an out-of-bounds index
return 0;
}
With +line_numbers
▶ #include <stdio.h> // It replaces the line number 0
1
2 int main() {
3 int arr[3] = {1, 2, 3};
4 int value = arr[5]; // Accessing an out-of-bounds index
5 return 0;
6 }
play
icon using something like:
```c +line_numbers +exec +exec_icon{▶|bg|fg} ```
+exec
is visible, it won't do anythingThanks for the kind words! Very nice, I like it. My idea is to make this indication configurable so it doesn't have to be forced to be this, there can be some decoration: play_button
or something in the theme.
@mfontanini,
You already show a bar for the execution status, what if you just always displayed it with a status of pending
/not started
instead of it suddenly appearing when the execution starts? The status progression would then be not started
, running
, finished
.
FYI, it looks like the execution block is slightly smaller than the status bar...
I think the above solution is fine and clear, if you want to continue with the icon indication then I suggest the following:
I'm creating this to see if someone has any ideas on how to do this: executable snippets should show something different that lets you realize they're executable. I can't think of a good way of doing this; IMO this should be:
I tried to put a little gear utf8 character in the bottom right corner of the code snippet but it doesn't look good. It is noticeable and non intrusive IMO but it doesn't look good.
A title on the top or bottom that says something like "executable snippet" would be noticeable but would be very intrusive to me.
Anyhow, if anyone has any ideas, please chime in.