Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 21, 2025

Summary

Originally we enabled format on type to ensure brace formatting on enter worked correctly. However

  1. We've had a number of complaints about format on type being enabled by default
  2. The format on type implementation has at least 1 known issue that is difficult to resolve - C# Automatic indentation formatting appears to be broken #8692 due to the formatting on type engine not being designed to handle non virtual space.
  3. We have moved brace formatting on enter to a separate custom call (on auto insert).

Because of these, we think the best path forward for the moment is to remove the default contribution to enable format on type.

Changes

  • Removed the [csharp] configuration block from the configurationDefaults section in package.json
  • This disables on-type formatting by default for C# files

Impact

Before: On-type formatting was automatically enabled for all C# files, causing issues for users when typing semicolons, braces, and other trigger characters.

After: On-type formatting is disabled by default. Users who want this functionality can still enable it manually in their VS Code settings:

{
  "[csharp]": {
    "editor.formatOnType": true
  }
}

Technical Details

  • The on-type formatting functionality itself remains unchanged - this PR only removes the default configuration
  • Integration tests for on-type formatting continue to work as expected (they test the feature directly via VS Code commands)
  • The change is minimal and surgical - only 3 lines removed from package.json

This allows users to opt-in to on-type formatting if they want it, rather than dealing with the known issues by default.

Original prompt

Can you remove the configuration that enables on type formatting by default from the package.json? The on type formatter has issues we cannot immediately fix


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: dibarbet <5749229+dibarbet@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove default on type formatting from package.json Remove default editor.formatOnType configuration for C# Oct 21, 2025
Copilot AI requested a review from dibarbet October 21, 2025 18:18
Copilot finished work on behalf of dibarbet October 21, 2025 18:18
@dibarbet dibarbet marked this pull request as ready for review October 21, 2025 18:29
@dibarbet dibarbet requested a review from a team as a code owner October 21, 2025 18:29
@dibarbet dibarbet requested a review from JoeRobich October 21, 2025 18:29
@dibarbet dibarbet merged commit d387c3f into main Oct 21, 2025
28 checks passed
@dibarbet dibarbet deleted the copilot/remove-on-type-formatting branch October 21, 2025 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants