-
Notifications
You must be signed in to change notification settings - Fork 30
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
Context aware indentation in VS Code #629
Comments
Is the current best solution to set the document to 4-spaces and use raw for html
and extra space after bullet item?
? |
Even if using raw code can work, the best practice is to use raw code blocks to ensure Quarto/Pandoc is using the content as is and do not try to process it as Markdown and hopefully guess right what the content is. Regarding lists. It does not matter with or without spaces or the number of spaces used for the indendation. What matters is that sub elements are aligned first the parent item first character. - A parent item
- The dash is under "A"
- The start is under "T". Using spaces is a trick to use your document default indentation and/or for style reason with numbered list: 1. An item
2. An item
30. An item
31. An item
122. An item |
Note a that I am not aware of any Markdown-based editor detecting code blocks/cells to apply various indentation. In the case of code cell and in Quarto document / Jupyter Notebook, it could be possible to scope the indentation as it's the case with execution/formatting abilities delivered via third party extensions. For code blocks on the other end, it's a bit trickier are those are text. |
Is there a way for VS Code to apply context-aware indentations in
qmd
files? For instance, I need the python blocks to be indented with 4 spaces. But if 4-space indentation gets applied to everything, then<div class="author">In a Div</div>
renders as a code block and the callout (which with 2 spaces correctly appears as a child of the first list item) is broken.Thanks!!
quarto: 1.6.39
VSCode: 1.96.2
OS: Darwin arm64 23.6.0
quarto plugin: 1.118.0
The text was updated successfully, but these errors were encountered: