foambubble / foam

A personal knowledge management and sharing system for VSCode
https://foambubble.github.io/
Other
15.46k stars 662 forks source link

Support for Notebook interface would be great! #1181

Open v217 opened 1 year ago

v217 commented 1 year ago

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

Support for ms-vscode.vscode-markdown-notebook would be great!
The .ipynb interface for markdown files allows you to mix code and preview freely – much more fine-grained control!
Completed sections or cells of your docs are previewed, while you work with code in the current cell.

Describe the solution you'd like

Notebook support for Foam markdown files!

Describe alternatives you've considered

WYSIWYG is cumbersome for code blocks and for technical writing.

Screenshots or Videos

No response

riccardoferretti commented 1 year ago

I didn't know about this extension, looks pretty interesting! I guess the type of integration you are thinking about is support for the preview side of things. Tbh it's not something I have looked at at all, not even sure what the API around it is. At the same time I can totally see the value, it might be worth further investigation. Thanks for the pointer!

darkmastermindz commented 1 year ago

@v217 @riccardoferretti I think this would just be a matter of being able to parse the same way as the vscode-markdown-notebook does in foam and including the extension.

Here's a reference to the VSCode Notebook API. Using the notebook serializer

In microsoft/vscode-markdown-notebook this is the relevant parts for reference: https://github.com/microsoft/vscode-markdown-notebook/blob/9dbbc23729894b92d05e839e485c41d8d85d835d/package.json#LL36C1-L37C1

Foam would need to basically extend this functionality to support Wikilinks for example:

https://github.com/microsoft/vscode-markdown-notebook/blob/9dbbc23729894b92d05e839e485c41d8d85d835d/src/markdownParser.ts#L56-L148

riccardoferretti commented 1 year ago

hi @darkmastermindz, I am not sure I understand how to extend the functionality, did you have an approach in mind?