I'm using Visual Studio code and have inherited a project that uses 'LF' line endings. By default Visual Studio Code opens my files in CRLF (i'm using Windows 10) which causes my git pre-commit hooks to fail. I don't get any error messages if I switch Visual Studio Code to use LF at the bottom right of the screen but obviously i'd like to avoid having to switch this every time I edit and try to commit a file.
I followed the instructions from this question and my understanding was that changing the files.eol setting to "\n" would open files in LF but it still opens them in CRLF.
I'm a little new to this stuff so please bear with me but if someone could tell me what i'm doing wrong that would be great.
Worth mentioning that the project has an editorconfig file with end_of_line setting as LF and changing this to CRLF also doesn't help