quarto-dev / quarto

Quarto open-source scientific and technical publishing system
https://quarto.org
GNU Affero General Public License v3.0
280 stars 19 forks source link

Support for `onTypeFormatting` in chunks #432

Open lionel- opened 1 month ago

lionel- commented 1 month ago

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: