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

VS Code extension - being able to execute "cells" using Cmd+Enter in .coco file #668

Open
JakartaLaw opened this issue Aug 14, 2022 · 3 comments

Comments

@JakartaLaw
Copy link

It is currently not possible to execute cell from .coco file in VS Code.

A cell is defined by:

# %%
"hello" |> print 
# %%

@evhub evhub added the tooling label Aug 15, 2022
@manisar2
Copy link

manisar2 commented Apr 24, 2023

Also, enabling the feature request above, I think, will automatically add the Shift Enter feature which is used in .py files to send a piece of code to the interactive window and run it there.

If not, just a reminder to add that as well.

@manisar2
Copy link

Found a workaround.
While working on a .coco file, we can still force the editor to treat it as Python file - by hitting Ctrl K M (or by clicking on the language name in the editor towards right at the bottom).

If we do that, we get all these features:

  • automatic cell creation with # %%.
  • send code to the interactive window using Shift Enter. Just remember to use the Coconut kernel in the interactive window so that coconut-inclusive-code is run successfully there..
  • all the usual Python based auto-completion, go-to-definition, find-all-references etc. Remember - all this is otherwise missing while working on a .coco file.

The downside is that syntax will be marked as wrong at the places where coconut specific code is used.

@andrkois
Copy link

i would like to work on this issue

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

No branches or pull requests

4 participants