zhaouv / vscode-markdown-everywhere

Embed and highlight and preview markdown in any language which support line-comment or block-comment for vscode.
https://marketplace.visualstudio.com/items?itemName=zhaouv.vscode-markdown-everywhere
Apache License 2.0
9 stars 3 forks source link

Support `number-sign-double-percentage` in more languages #4

Closed MatrixRanger98 closed 3 years ago

MatrixRanger98 commented 3 years ago

I like this extension very much. But I should recommend supporting number-sign-double-percentage instead of other options in more languages. This is actually a standard way of declaring cells and writing markdown comments in scripts dating back to Eclipse and Spider IDE and is widely supported by many editors and tools including Atom - Hydrogen, Jupytext, Visual Studio - Python Tools and PyCharm alongside VSCode - Jupyter. This is called percent format according to Jupytext.

zhaouv commented 3 years ago

There is already number-sign-double-percentage rule for python here, which has format

# %% [markdown]
# # highlight python markdown cell
# for the vscode-python data-science feature

In my impression # %% are splitters for cells, not signs for markdown cells. It should be appended [markdown] in python to declare markdown cell.

MatrixRanger98 commented 3 years ago

Yes. It is already implemented but only for python and there are conflicts between this grammar and others. I use R and Julia a lot besides Python in Atom Hydrogen and often use Jupytext to translate the percent format scripts to rmarkdown and then have it compiled by knitr. The two tools mentioned above have this kind of markdown cell support for multiple languages. Since Atom community is not active any more, I am expecting extensions with similar features in VSCode.

zhaouv commented 3 years ago

it will work for all these languages next version in few days

coffeescript
dockerfile
git-commit
git-rebase
diff
ignore
properties
makefile
perl
perl6
powershell
python
r
ruby
shellscript
yaml
cython
julia
cmake