Open fizruk opened 1 year ago
Just for input, with Markdown Preview Enhanced this works perfectly fine in my setup. But you said you already tried this without success. Perhaps something can be done with your local setup?
Perhaps, although I'm not sure what prevents MPE from working on my machine. The only way I can make it do something is by explicitly calling it from the Palette:
However, I do not get any features like scroll sync:
What do you think I should check locally? I am on a macOS 13.4, VS Code 1.79.0.
Oh. I've only used it from the command palette so far, and didn't know about the other features. However, luckily, I think I have a solution for you!
By adding the following to your keybindings.json
file. The shortcuts for Markdown Preview Enhanced will work for all file types with markdown
in their name :)
{
"key": "ctrl+shift+enter",
"command": "markdown-preview-enhanced.runAllCodeChunks",
"when": "editorLangId =~ /.*markdown.*/"
},
{
"key": "shift+enter",
"command": "markdown-preview-enhanced.runCodeChunk",
"when": "editorLangId =~ /.*markdown.*/"
},
{
"key": "ctrl+shift+s",
"command": "markdown-preview-enhanced.syncPreview",
"when": "editorLangId =~ /.*markdown.*/"
},
{
"key": "shift+cmd+v",
"command": "markdown-preview-enhanced.openPreview",
"when": "editorLangId =~ /.*markdown.*/"
},
{
"key": "cmd+k v",
"command": "markdown-preview-enhanced.openPreviewToTheSide",
"when": "editorLangId =~ /.*markdown.*/"
},
{
"key": "shift+cmd+v",
"command": "markdown.showPreview",
"when": "!notebookEditorFocused && editorLangId =~ /.*markdown.*/"
},
{
"key": "cmd+k v",
"command": "markdown.showPreviewToSide",
"when": "!notebookEditorFocused && editorLangId =~ /.*markdown.*/"
}
You could ship similar key bindings with the extension if you want, but then I would advise you to only match literate rzk markdown
for obvious reasons 😄
I'm not getting sync to work either.
Is this resolved by #16 or is there still a missing feature?
I think it is good enough, although it would be great to somehow have the option to have Markdown Preview Enhanced to work as well. In particular, MPE allows to sync scrolling code with Markdown and seems to work better with images, etc.
I'm not sure what is the current status of this feature, but for me sync scrolling works with default markdown preview. The only small problem I encountered is that the preview can be opened only through a small button on the corner of the editor:
I think having a searchable option (command/shortcut) might avoid some confusion with previews. with rzk file:
with md file:
PR that should fix it: https://github.com/rzk-lang/vscode-rzk/pull/37
I got error trying to run it locally, so hopefully someone with environment ready can check if it works 🥺
For what it's worth, scroll sync is working for me with Markdown Preview Enhanced as well. Sadly, I cannot find any resource for having a language (such as literate rzk markdown
) inherit another language (markdown
in this case) entirely, including its commands and configuration. Only the syntax highlighting as we currently have.
I'm not sure what is the current status of this feature, but for me sync scrolling works with default markdown preview.
btw sometimes it stops working when file type is literate rzk...
. fixable by swtiching it to just markdown file
There is one thing that I don't know yet how to fix:
*.md
files have Markdown Preview, but*.rzk.md
do not anymore. Markdown Preview is useful when I insert SVG diagrams in the markdown files (e.g. see Associativity section for Segal Types). If you have ideas or you would like to submit a PR — it would be most welcome! :)Originally posted by @fizruk in https://github.com/fizruk/vscode-rzk/issues/1#issuecomment-1565609238