-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Code runner #5141
Comments
Code runner is an essential feature for any text editor that pretends to be a developer's editor. In my Ruby development flow, I constantly hundreds of times a day make changes and run Ruby test scripts from Atom. I still prefer Atom's clean interface and theme having tried VS Code, Sublime, and even Helix. Atom Script extension is still very convenient because when I run tests and see errors in the Sublime Text has it from the box, at least for C and Ruby - just press Ctrl+B. Atom Script Runner by Ctrl+Shift+B. Another solution could be to add a sort of shell-commands with the ability to pass the reference to current file in the editor, sort of just "run-shell-with": [
{
"name": "run Ruby",
"args": [
"ruby",
"%full-path-to-the-current-file-in-editor%",
"some other options"
]
},
{
"name": "rake test",
"args": ["rake test"]
}
] |
Hello, it's a very important feature. Of course, you can write your automation on top of AHK-Windows/X11-Linux/whatever, but it's way better to have at least an easy way to land a build-and-run shortcut |
I'm interested in contributing to this issue, but would need some guidance. Could someone please point me in the right direction to start working on this? |
Me and @osiewicz are working #7108 It is not planned to be as fancy as in the video initially, but soon™ we expect to have a way to have @osiewicz works on that particular bit and things looked good so far, consider pairing with him if you want to work on this particular task. |
Hey, yeah, tagging is enough; what timezone are you in? |
I'm in EST so I think you're about 6 hours ahead of me. Would you be free to pair up this Thursday? |
Yep! I've sent you a message on Discord, let's figure out the schedule there. |
Hello, is there any updates regarding this issue? |
Part of #5141 * adds "run selection" and "run file" tasks for bash and Python. * replaces newlines with `\n` symbols in the human-readable task labels * properly escapes task command arguments when spawning the task in terminal Caveats: * bash tasks will always use user's default shell to spawn the selections, but they should rather respect the shebang line even if it's not selected * Python tasks will always use `python3` to spawn its tasks now, as there's no proper mechanism in Zed to deal with different Python executables Release Notes: - Added tasks for bash and Python to execute selections and open files in terminal
#10548 (will be part of Zed 0.132) had added language tasks to Bash and Python, allowing to run a selection, or the opened file via user's default shell or Zed tasks can be customized and have access to editor selections, so other languages may be supported locally now already. What's missing so far:
Technically, the issue could be closed and the missing parts considered in follow-ups, but let's keep the issue open at least before the 0.132 is actually released. |
Tasks have been out for a bit and so I'm going close this issue. Feel free to open additional issues with enhancement requests for improving task functionality in Zed. See: Zed Tasks Documentation for more. For reference, there is a default task for "execute selection" (as requested above) but if you want a custom version of the same (say using an alternate binary) you can easily do so using
Happy tasking! |
@notpeter Sorry to necro this, but I followed another issue that mentioned the debugger feature request being bundled here - is an in client debugger something that's still in the pipeline or has that changed? |
Check for existing issues
Is your feature request related to a problem?
No.
Describe the solution you'd like
I think it would be pretty cool to be able to execute code from within the editor without needing to manually run a
node *
orpython *
command from a terminal tab. Basically looking for something similar to VSCode's Code Runner extension.If applicable, add mockups / screenshots to help present your vision of the feature
VSCode Code Runner
The text was updated successfully, but these errors were encountered: