-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
introduce .editorconfig file #148
base: main
Are you sure you want to change the base?
Conversation
5c7ad92
to
d06f661
Compare
My own prefs: How many spaces for javascript files ? => 2 Should we add as well: [*.md]
trim_trailing_whitespace = false # keep end of line double-space for markdown EOL
max_line_length = 120 # wrap after X chars
[*.json]
indent_style = space
indent_size = 4 ? What about |
Ha! For markdown, not sure it's a good idea. For full text markdown, I use soft wrap, no nead for enforced max length, soft wrap will adapt the text to the screen. Soft wrap or max length can be problematic when you have table or links in your markdown, it's very common to have a link or a table row that is longer than 120 chars and they don't wrap nicely (not even sure they can't be cut). For this, I have no solution except not enforcing max length. For code, on my 13" screen, with a pretty large left panel, I can display 120 chars, 165 without the menu, on a bigger screen I think 200 easy. After looking my last project code, I (almost) never write more than 120 chars per line so I vote for 120. |
Actually it's quiet a common thing to restrain the max line length for markdown, rst and other docs formats ; Symfony even restrict it to 80 chars, but note this is not a "hard" rule, if the line is 81 chars or contains a link, code block, …, it'll be allowed as-is. Same for tables, it's not really an issue. If it cannot be wrapped, it won't. It mainly enforces paragraphs.
👍🏻 |
5ec4a32
to
ee0081f
Compare
# Symfony # | ||
########### | ||
|
||
[*.twig] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[*.twig] | |
[*.html.twig] |
?
Sometimes we might generate something else than HTML, and I think the generated format indent matters more than Twig indent. We use 4 for twig in most cases because we use 4 for HTML, right?
ee0081f
to
7960c68
Compare
This PR aims to generalize usage of .editorconfig file on Elao projects and to prevent IDE config to non consistent with project practice in terms of indentation.
Add a basic .editorconfig file to the manala.app recipe.
https://editorconfig.org/
These rules will be created by manala init, then project maintainers can modify them, manala will not overwrite them.
The base is 4 spaces for indent all files, tabs for makefile.
Need to be completed by specific rules: