leo-arch / clifm

The shell-like, command line terminal file manager: simple, fast, extensible, and lightweight as hell.
https://github.com/leo-arch/clifm/wiki
GNU General Public License v2.0
1.33k stars 40 forks source link

Add an `.editorconfig`? #239

Closed spenserblack closed 1 year ago

spenserblack commented 1 year ago

Is your feature request related to a problem? Please describe. Before contributing to a repo (https://github.com/leo-arch/clifm/issues/238#issuecomment-1644385662) I feel a bit safer if there's an .editorconfig file so that I don't mess things up with incorrect line endings, missing final newlines, etc.

Describe the solution you'd like An .editorconfig file sets up a compatible editor with some basic behavior:

For example, since the linked issue comment talks about Fish:

root = true

[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

[*.fish]
indent_style = space
indent_size = 4

Describe alternatives you've considered Just going for it.

Additional context Let me know if you have any questions.

leo-arch commented 1 year ago

Didnt't know anything about EditorConfig. I'll definitely take a look at it.

leo-arch commented 1 year ago

Hey @spenserblack, hope this will be enough. Let me know if something comes up.

spenserblack commented 1 year ago

Yeah, that looks like it would be enough. It really just depends on your preferred style / editor behavior.

Just quickly skimming through your files, I found that you probably want to add this, though.

[*.{yaml,yml}]
indent_style = space
tab_width = 2

Edit: CMakeList.txt probably needs 2-space indentation, too.

Edit 2: Nevermind, CMakeList.txt has mixed indentation it seems.