Skip to content

Helix doesn't respect Git CRLF-related settings #13601

Description

@nahuakang

Summary

Hi Helix maintainers!

I have a Windows and a macOS machine. On the Windows machine I have the following Git setting per Git documentation's recommendation:

git config --global core.autocrlf true

On the macOS machine I have the following Git setting:

git config --global core.autocrlf input

Whichever default-line-ending I use doesn't seem to matter:

  • Every time I check out a new commit written on the macOS machine on the Windows machine with Helix and simply press :w, it ends up in CRLF with the ^M on git diff.
  • Every time I checkout a new commit written on the Windows machine on the macOS machine with Helix and simply press :w, it ends up in LF (basically re-writing the entire file).

The Git gutter also just shows all the changes.

This issue doesn't exist on neovim, Sublime Text, or VS Code on these machines.

Is this the expected behavior? I'd have expected that Helix would behave similarly but sadly it doesn't. And to be honest I really would have preferred to work on Helix but currently it's impossible to do so.

The old quick fix from 2022 doesn't work.

Thanks for your time to read!

Reproduction Steps

I tried this:

  1. hx

I expected this to happen:

Instead, this happened:

Helix log

~/.cache/helix/helix.log
please provide a copy of `~/.cache/helix/helix.log` here if possible, you may need to redact some of the lines

Platform

macOS / Windows

Terminal Emulator

Windows Terminal / Ghostty

Installation Method

source / brew

Helix Version

helix 25.01.1 (e7ac2fc)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions