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

[Feature Request] Enhanced MyST Integration for Seamless Literate Programming in VS Code #62

Open
Foadsf opened this issue Sep 27, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Foadsf
Copy link

Foadsf commented Sep 27, 2024

Is your feature request related to a problem? Please describe.
As a literate programming enthusiast, I find the current VS Code integration lacks some features that would make the workflow more seamless and efficient. Specifically:

  1. There's no real-time preview for non-computational parts of the document.
  2. Writing and executing Python code directly within the MyST file is not supported.
  3. The execution and rendering of computational cells lack flexibility and visual feedback.
  4. Managing temporary files and project organization could be improved.

These limitations make it challenging to fully leverage MyST for literate programming within VS Code, often requiring workarounds or external tools.

Describe the solution you'd like
I'd like to see the following enhancements to the MyST VS Code extension:

  1. Real-time lightweight preview: Implement a preview panel that updates in real-time for non-computational parts, similar to standard Markdown preview.
  2. Integrated Python execution:
    • Enable writing and executing Python code directly within .myst.md files.
    • Support calling tagged #%% sections from external .py files or to transclude them directly.
    • Allow flexibility in file organization (single .myst.md or multiple files).
  3. Enhanced code cell execution:
    • Add a keyboard shortcut to update and render all computational cells.
    • Enable running specific cells or all cells up to a certain point.
    • Visually indicate outdated outputs in the preview.
  4. Project organization:
    • Provide an option to isolate temporary generated files in a specific folder.

Describe alternatives you've considered
I've explored several alternatives, but each has significant drawbacks:

  1. Semi-WYSIWYG solutions like Jupyter Notebooks (.ipynb files), WxMaxima, or GNU TeXmacs: These are not suitable due to their git-unfriendly nature, which complicates version control and collaboration.

  2. Quarto: This comes close to meeting my needs and does almost everything except the lightweight real-time rendering. While it's a powerful tool, the lack of instant preview for non-computational parts is a limitation for my workflow.

  3. Using standard Markdown with code blocks: This approach lacks the rich features of MyST and doesn't support executable cells, which are crucial for literate programming.

  4. Employing external build tools to render MyST documents: This breaks the immediate feedback loop, making the writing and coding process less fluid.

These alternatives have led me to believe that enhancing the MyST VS Code extension would be the most effective solution for creating a seamless literate programming environment while maintaining git-friendly, plain text files.

Additional context
These enhancements would create a more integrated literate programming environment within VS Code, similar to the experience in Jupyter Lab but with the advantages of MyST Markdown and VS Code's extensibility.

The ideal workflow would allow seamless switching between writing documentation, coding, and viewing results, all within the same VS Code window and primarily interacting with .myst.md files.

I'm open to discussing these ideas further and potentially contributing to their implementation if that would be helpful.

@Foadsf Foadsf added the enhancement New feature or request label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant