Formatting issues with Cursor

Hey, thanks for the report. This is a known issue and the team is aware of it. It looks like a bug where whitespace or line endings get auto-modified when the IDE starts.

This was fixed in 2.3.x, but some users say it came back in newer versions. You’re on 2.4.31.

Related threads where users described the same issue:

To dig into your case, I’ll need a bit more info:

  1. What exactly changes in the files? Can you share a Git diff for one changed file (screenshot or text)?
  2. What’s the value of git config core.autocrlf?
  3. Do you have any formatter extensions installed (Prettier, ESLint, etc.)?
  4. Does it still happen if you launch Cursor with cursor --disable-extensions?
  5. Please check formatting settings:
    • Cursor Settings, search insertFinalNewline
    • Cursor Settings, search trimTrailingWhitespace
    • Cursor Settings, search format on save

Temporary workarounds (from other threads):

  • Open each changed file, click Accept changes, close Cursor, then reopen it
  • Or just reset to the last commit after starting the IDE

Let me know what you find. It’ll help confirm if the bug is back or if it’s specific to your setup.