The regexp-based indentation rules of VS Code are quite limited in what they can achieve so some language extensions have resorted to correcting indentation from their LSP, via the onTypeFormatting request for \n characters. That's the case with python for instance where the heavy lifting of indentation is done from pylance.
This currently doesn't work in quarto chunks, I believe (from a cursory look) because the quarto extension needs to:
Enable "editor.formatOnType"
Register an OnTypeFormattingEditProvider
Forward formatting requests to the corresponding virtual document (if supported?)
The regexp-based indentation rules of VS Code are quite limited in what they can achieve so some language extensions have resorted to correcting indentation from their LSP, via the
onTypeFormatting
request for\n
characters. That's the case with python for instance where the heavy lifting of indentation is done from pylance.This currently doesn't work in quarto chunks, I believe (from a cursory look) because the quarto extension needs to:
"editor.formatOnType"
OnTypeFormattingEditProvider