Skip to content

add args to editor.action.formatDocument.multiple - #245743

Merged
Dmitriy Vasyura (dmitrivMS) merged 8 commits into
microsoft:mainfrom
leep-frog:main
Aug 31, 2026
Merged

Dmitriy Vasyura (dmitrivMS) merged 8 commits into
microsoft:mainfrom
leep-frog:main

Conversation

@leep-frog

@leep-frog leep-frog commented Apr 5, 2025 •

Copy link
Copy Markdown
Contributor

Fix for #245742

@leep-frog

Copy link
Copy Markdown
Contributor Author

I was able to try this out locally and it works as expected!

I ran the following commands (see video below):

  1. Created a keybinding that runs the editor.action.formatDocument.multiple command (with the formatter argument commented out)
  2. Run the command on hello.py
  3. Prompted to select which formatter to use (this is consistent with current behavior outside of this PR
  4. Updated the keybinding to un-comment the formatter argument
  5. Run the command on hello.py
  6. No formatter prompt is shown and formatting is run with the provided formatter
Format.multiple.with.args.mp4

Remove error messages for no or multiple formatters.
Copilot AI balanced review requested due to automatic review settings August 30, 2026 19:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds formatter arguments to editor.action.formatDocument.multiple, enabling keybindings to select a formatter directly.

Changes:

  • Adds a typed formatter argument.
  • Selects matching providers without opening the formatter picker.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@dmitrivMS Dmitriy Vasyura (dmitrivMS) added the formatting Source formatter issues label Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

formatting Source formatter issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants