Quarto Extension
Code blocks with a filename attribute display a window header with the filename. The decoration style depends on the style option (default: "macos").
fibonacci.py
With auto-filename: true (the default), code blocks without explicit filenames automatically show the language name in small-caps styling.
Code blocks without a language are not affected by the extension.
Set code-window-no-auto-filename="true" on a single block to suppress the auto-generated filename without changing the global setting.
To disable auto-generated filenames for the entire document, set auto-filename: false in the extension configuration. Only code blocks with an explicit filename attribute will display window decorations.
Three decoration styles are available via the style option. The global style can be set in the document configuration. Individual blocks can override the style with the code-window-style attribute.
Traffic light buttons on the left, filename on the right.
Minimise, maximise, and close buttons on the right, filename on the left.
Plain filename on the left, no window decorations.
Note
Typst code-annotations support and filename attribute handling are temporary hot-fixes. They will be removed once Quarto natively supports these features (see quarto-dev/quarto-cli#14170). The extension will then focus on auto-filename and code-window-style features.
Code annotations work standalone and together with code-window styling.
A single annotation number can appear on several consecutive lines. Only the first occurrence receives a back-label to avoid duplicates.
pipeline.py
Set code-window-enabled="false" on a block to disable window chrome while keeping annotations.
Set the global style in the document front matter:
Each hotfix accepts either a boolean or a map with enabled and quarto-version keys for per-hotfix version thresholds:
Override per block with the code-window-style attribute: