Skip to content

Document formatter-specific Format Document keybindings #10200

Description

@ntrogh

Product change

Users with multiple formatters can now bind editor.action.formatDocument.multiple to a specific formatter. Passing a formatter argument selects the matching formatter extension without showing the formatter picker.

Why the docs need an update

The keybindings documentation explains how to pass command arguments, but it does not document this formatter-specific workflow or the expected argument shape. Users currently have no permanent documentation for creating a shortcut that runs a nondefault formatter directly.

Suggested documentation

  • docs/configure/keybindings.md: add a formatter-specific keybinding example that passes { "formatter": "publisher.extension-id" } to editor.action.formatDocument.multiple.

Details to verify

  • formatter is the formatter extension identifier and matching is case-insensitive.
  • Omitting the argument preserves the existing formatter picker.
  • If the requested formatter is not available for the active document, the command does not format the document.

Acceptance criteria

  • The keybindings documentation includes a working example for invoking a specific document formatter.
  • The example distinguishes this workflow from configuring the default formatter and from opening the formatter picker.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

doc-enhancementsuggested addition or improvement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions