Skip to content
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

Toggle Code Actions doesn't work for runnable code blocks #27259

Open
aymennasri opened this issue Mar 21, 2025 · 2 comments
Open

Toggle Code Actions doesn't work for runnable code blocks #27259

aymennasri opened this issue Mar 21, 2025 · 2 comments

Comments

@aymennasri
Copy link
Contributor

aymennasri commented Mar 21, 2025

Summary

Upon trying to run a runnable code (like a pytest test) with the code actions shortcut ctrl-. as mentioned here, it fails to run it.
However when having a lint issue, the code actions will be toggled displaying both Fix with Assistant and the run code option.

Edit: For other than test blocks, the run button seems to work (tested with R)

Steps to trigger the problem:

  1. Create python test
  2. Press ctrl-.

Actual Behavior:

No code actions, only toggled when having another option other than the run code option.

Expected Behavior:

Toggled code actions with the run code option even if there's no other option with it.

Zed Version and System Specs

Zed: v0.178.5 (Zed)
OS: Linux X11 linuxmint 22.1
Memory: 31 GiB
Architecture: x86_64
GPU: Quadro T2000 || NVIDIA || 550.120

@aymennasri aymennasri changed the title Toggle Code Actions doesn't work unless there is a linter issue to fix Toggle Code Actions doesn't work unless there is a second option Mar 21, 2025
@aymennasri aymennasri changed the title Toggle Code Actions doesn't work unless there is a second option Toggle Code Actions doesn't work for runnable code blocks Mar 21, 2025
@MrSubidubi

This comment has been minimized.

@aymennasri
Copy link
Contributor Author

Hey, thank you for your report!

I am pretty but not entirely sure that this issue is a duplicate of #27066 and should be resolved in an upcoming release.

Feel free to check for yourself, otherwise, could you check the following:
1, Is there anything in your zed logs (zed: open log)?
2. Do you have just a singular Python-file or a whole project open?
3. Does this only happen for Python-files?

Thanks in advance!

Not a duplicate and it only works in certain cases (i created an entry in runnables.scm to run an entire R script), i tested it with both Python tests (a simple one in a single python script) and R tests which i created personally combining the runnables file and tasks and it worked but i couldn't run them with the code actions (unless there was an issue with the linter, it displays it as a second option) similar to the python tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants