microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.35k stars 28.91k forks source link

Support editor extension commands in Git commit message input box #103128

Closed segevfiner closed 10 months ago

segevfiner commented 4 years ago

I wanted to be able to use the Rewrap extension in the VS Code Git commit message input box to automatically rewrap the commit message instead of having to do so manually (https://github.com/stkb/Rewrap/issues/224), but such commands don't work in that location and there is no way for the extension to make them work with the current API. I wish for VS Code to support some way for such commands to work there.

lszomoru commented 10 months ago

Clicking the commit button without providing a commit message, will trigger a new flow that would enable users to use the full editor to author the commit message. Authoring the commit message using the editor also enables us to define editor rules, and wrapping behaviour based on those rules:

  "[git-commit]": {
    "editor.rulers": [
      72,
      50
    ],
    "editor.wordWrap": "wordWrapColumn",
    "editor.wordWrapColumn": 72
  }