Roald87 / TcBlack

Opnionated code formatter for TwinCAT.
MIT License
105 stars 10 forks source link

Override automatic type detection of line ending and indentation #28

Closed Roald87 closed 4 years ago

Roald87 commented 4 years ago

Currently if TcBlack will detects a single \r\n in a .TcPOU file it will use \r\n as a line ending. Similarly for the indentation: if it finds a single \t in a file it will use that one for the entire file.

It would be nice to override this behavior. For example in case there is a single \t in the file, but everywhere else four spaces are used.

Also this would allow for more indentation types then the current options of tabs or four spaces. Finally this would allow for an easy way to standardize the indentation across an entire project.