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

Markdown in code #1264

Closed
lveillard opened this issue Jul 26, 2023 · 1 comment
Closed

Markdown in code #1264

lveillard opened this issue Jul 26, 2023 · 1 comment

Comments

@lveillard
Copy link

lveillard commented Jul 26, 2023

Is your feature request related to a problem? Please describe.

One thing i miss in all these tools is being able to inject md directly in my js or ts files. Imagine adding titles, images, link to other .js files lines...

Describe the solution you'd like

An example:

// MARKDOWN-BEGIN
/*
# Help
See [this function](file.js#L12-L18) for more details.
*/
// MARKDOWN-END

Foam could automatically interpret those md parts inside .js / .ts / .jsx / .tsx files and show them properly, including images. They would be also used for the graph connections.

For files that are long, it would be a way to split the file using sections, titles, maybe a quick image to describe with a beautiful flow chart what is happening etc

Some key features that would be neded:

  • (should) A command to hide all markdown (focus mode)
  • (should) A button to edit/view mode the markdown blocks
  • (nice to have) A warning when references have changed. Imagine you're referencing this lines (file.js#L12-L18). This lines have then a backlink. When changing that code, a little warning could pop up "maybe you want to change the reference or the doc around this function"

Describe alternatives you've considered

Split it in .ts and .md files. But is less powerful and i like having things close to where they belong

Screenshots or Videos

No response

@riccardoferretti
Copy link
Collaborator

Hi @lveillard thanks for raising the issue, unfortunately I consider that to be out of scope for Foam, there is no plan to add such a feature.
I am not familiar with alternative solutions that might satisfy your use case, maybe if you find something you could post it here for other people that might have similar issues.

@riccardoferretti riccardoferretti closed this as not planned Won't fix, can't repro, duplicate, stale Jul 27, 2023
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