Skip to content

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

Open

Description

@gtritchie

Bug description

Copied from: rstudio/rstudio#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."
}

Activity

  1. added
    bug
    on Oct 6, 2025
  2. added theissue type on Oct 6, 2025
  3. cscheid commented on Oct 8, 2025

    @cscheid
    Member

    Thanks! Sending this to quarto-cli, where all the schema information is stored and managed.

  4. added theissue type on Oct 8, 2025
  5. transferred this issue fromquarto-dev/quartoon Oct 8, 2025
  6. self-assigned this
    on Oct 8, 2025
  7. added
    yaml-validation
    on Oct 8, 2025
  8. added this to the v1.9 milestone on Oct 8, 2025
  9. removed theissue type on Oct 8, 2025
  10. modified the milestones: v1.9, v1.10 on Feb 17, 2026
  11. modified the milestones: v1.10, v1.11 on Jul 30, 2026
  12. modified the milestones: v1.11, v1.12 on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugyaml-validation

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions