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

[Feature Request] Pre-fill `label` YAML field for VSCode snippets #417

Open jimjam-slam opened 2 months ago

jimjam-slam commented 2 months ago

Always keen to file a feature request to save myself a few keystrokes 😉

The VSCode Quarto extension currently creates empty code chunks, tied to Cmd+Shift+I:

Screenshot of an R code chunk in VSCode, with a menu showing different Quarto languages. The code chunk is empty.

I'd love it if (perhaps contingent on a settings toggle) these chunks were created with the label YAML key already there:

Screenshot of an R code chunk in VSCode. The text "#| label: " is inside the chunk.

I daresay there are lots of things folks would love to have pre-filled for their own use cases, but I'd argue label is one that comes up a lot for most people (perhaps more than any other), and unlike other common use-cases, it can't be set as a document-level default.

Plus, it encourages people to add labels for their chunks, which is good reproducible research practice 🥳

I'm using Quarto VSCode extension version v1.111.0!