-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
Add a snippet for EditorConfig file content #50
Conversation
indent_size = ${4:4} | ||
indent_style = ${5:space} | ||
insert_final_newline = ${6:true} | ||
trim_trailing_whitespace = ${7:true} |
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.
Use the same property ordering as here: https://github.com/sindresorhus/editorconfig-sublime#example-file
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.
I can get all your default recommend settings. Can I add the indent_size
as a comment?
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.
👍
Good idea :) Can you add something to the readme that it's included and how to use it? |
No sure the tips section is the suitable place for the snippet how-to, I've oriented the text in a tips way. |
I've added a small precision for user with conflicting snippet. |
@@ -0,0 +1,18 @@ | |||
<snippet> | |||
<content><![CDATA[ | |||
# EditorConfig is awesome: http://EditorConfig.org |
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.
Drop this line
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.
Done
2a5f8db
to
3e8daa9
Compare
Any advice on this ? |
👍 lgtm
I'm not against keeping it as is. |
[*.md] | ||
trim_trailing_whitespace = false | ||
]]></content> | ||
<tabTrigger>editorconfig</tabTrigger> |
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.
Should probably set scope
to source.ini.editorconfig
.
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.
Well, in fact I dropped the scope to ease fast creation of editorconfig. The scenario I was thinking was :
- "Hey! I should add the EditorConfig file"
- Create a new file (here, ST open a Plain Text file)
- Call the snippet
- Adjust rules
- Save
I don't know if the initial scope of ST can parameterized by user, that's why I didn't specified the scope.
Maybe we can use source.ini.editorconfig,text.plain
. No?
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.
Maybe we can use source.ini.editorconfig,text.plain. No?
👍
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.
Done!
Sorry about the delay @kipit. I got too busy in real life. I added some inline comments, but generally looks really good :) |
No problem for the delay. Your comments have been integrated, except the scope one where I need feedbacks. |
Awesome! Landed at last. Thanks for persevering through this :) |
Event if the scope of EditorConfig files is very limited, this snippet ease the creation of EditorConfig files. All parameters except
tab_size
are used, as this one has a default based onindent_size
.