For brand new files (created in IDE) you can change default line ending in Preferences | Code Style | General | Line Separator
.
For existing files -- it is automatically detected for each file individually. You can change line ending at any time by changing File | Line Separators
(or via right click in status bar in appropriate place -- where current line ending is displayed).