-
Notifications
You must be signed in to change notification settings - Fork 11
[WIP] evaluate selected range using shift-enter and ctrl-enter #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
fixes #7 |
If I find the time in the next few days, I would also take a look at Works using selection shift-enter (single statement multiple lines): d1 $ s "hh*8" -- selected
# up "1 2 3 4" -- selected Does not (multiple statements multiple lines), but hopefully with a selection-type ctrl-enter: d1 $ s "hh*8" -- selected
d2 $ s "bd*4" -- selected This would really improve usability, at least for me. Selecting entire sections to execute, maybe even giving the |
evaluation of a selection of single line statements
Functionality is implemented. The mocking system of the unit tests irritate me a bit. I don't have the time to dive into those right now. My problems with the mocks:
I'm not sure if I can take this on right now.
For multiple single line statements, I prefix the statements with a |
Welp. I done goof'd. The
Using this method everything is evaluatable. f :: a -> a
f a
| a < 0 = 0
| otherwise = a with Single statements over multiple lines: d1 $ s "hh*8"
# up "1 2 3 4" with
I really hope I got everything right this time. But I've got a good feeling about it. |
@lopho are the tests broken in this PR or should they run successfully? |
Yes, they are broken. I tried to fix it, but the values returned by the editor mock objects are absurd when selecting.
If you have the time, could you please take a look at those tests, especially the behavior of tests when checking the content of expressions. There seems to be some concurrency issues as well, as lines get returned in mixed order and such (in the tests/mocking objects, not the real thing). |
Did you get evaluating multiple statements in one go working in the end? e.g.
I'm not a vscode user but am interested because we tried (and failed) to get this working in emacs |
@yaxu Yes, your example works (using |
shift-enter
ctrl-enter