YAML autocompletion suggests incorrect 'category' (singular) instead of Quarto's 'categories' (plural); schema type should be array

Open
#13,519 1 comment 0 reactions 1 assignee View on GitHub

@cscheid is already working on this.

Since Oct 8, 2025.

Assessment

This issue has not been assessed yet.

Description

bug yaml-validation
Bug description

Copied from: https://github.com/rstudio/rstudio/issues/16524

System details
  • RStudio Edition: Desktop
  • RStudio Version: 2025.09.1+401
  • OS Version: Linux Mint
  • R Version: 4.3.3
  • Quarto Version: 1.7.33

Steps to reproduce the problem
  1. Create a new Quarto document:
    • Open RStudio.
    • Go to File → New File → Quarto Document (any format, e.g., HTML).
  2. Trigger YAML autocompletion:
    • In the YAML frontmatter, type cat and pause to let autocompletion suggest fields.
    • Observe the suggested field: category: (singular, string type).
  3. Verify incorrect behavior:
    • Accept the suggestion (category: "Test").
    • Render the document (e.g., "Render" button or quarto render).
    • Result: Quarto ignores category: (no error, but no effect).
  4. Manual correction:
    • Replace category: "Test" with categories: [Test].
    • Re-render. Result: Works correctly.

Describe the problem in detail

RStudio’s YAML autocompletion suggests the incorrect field category: (singular, string) for Quarto documents (.qmd), but the official Quarto documentation specifies that the correct field is categories: (plural, array).

Root cause:
The schema in RStudio’s internal YAML validator (/opt/quarto/share/editor/tools/yaml/web-worker.js, line ~16457) defines:

{
  "name": "category",
  "schema": "string",
  "description": "The document category."
}
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from quarto-dev/quarto-cli

All issues in quarto-dev/quarto-cli

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.