Skip to content
This repository was archived by the owner on Jan 3, 2024. It is now read-only.

feat: Add last runnables#199

Merged
simrat39 merged 1 commit intosimrat39:masterfrom
rockerBOO:rockerBOO/cache
Jan 25, 2023
Merged

feat: Add last runnables#199
simrat39 merged 1 commit intosimrat39:masterfrom
rockerBOO:rockerBOO/cache

Conversation

@rockerBOO
Copy link
Contributor

This allows users to run runnables that were run previously.
Example: Running previous test runnable and not needing to return
the cursor to the function position.


Would love feedback on this feature. Things like where should it be, how things are named, configuration options, and any other feedback. I put it into the hover menu because that's what I started to use, but there's also runnables.lua where this may work better or in addition to hover_actions.lua.

Thank you!

This allows users to run runnables that were run previously.
Example: Running previous test runnable and not needing to return
the cursor to the function position.
@simrat39
Copy link
Owner

Thanks for the PR, looks mostly good to me, but:

  • I think we should always cache (not super expensive)
  • And add a command to run the last runnable

Also, would it be possible to rework this to merge this into the modularize_and_inlay_rewrite branch as I'm planning to merge that into main very soon

@rockerBOO
Copy link
Contributor Author

Ok, can do those.

I have been using this branch for a while, and it's mostly good, but it also catches undesired effects and causes them sometimes to fire off unexpectably.

For example,

  • tests runnables work great
  • go to definition seems to be a runnable that is captured
  • but debug doesn't seem to run again (I have something else that correctly debugs the last one though)

So in the short term it might be good to not make it a general "last_runnable" but limit it to test runnables, specifically the ones for the test functions. My question is, should we expand the API to have specific types of runnables, and commands for those,

:RustLastTest
:RustLastDebug
:RustLastRunnable

or filter RustLastRunnable to not include go to definition type things and make debugger work with :RustLastRunnable.

:RustLastRunnable

Mostly want to pin down the API before a release that is consistent. Thank you, I will post a pull request to that branch.

@simrat39 simrat39 merged commit 324f564 into simrat39:master Jan 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants