-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set tab_width=indent_size if tab_width undefined
- Loading branch information
1 parent
1e653b8
commit 2df0e97
Showing
1 changed file
with
4 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2df0e97
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'm wondering whether we should implement this feature in EditorConfig Core or here. Which one do you think is better?
2df0e97
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.
That's a good point. Maybe we should put this feature in the EditorConfig core instead.
If we ever decide there is a use case for checking whether tab_width is specified in a plugin (or another program that uses EditorConfig) we could work with plugin developers to phase out that functionality in the core or add a switch to turn it off.
2df0e97
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.
We could add a switch to turn this functionality on or off. Let's call it "value preprocessing feature"?
2df0e97
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.
We could. Maybe that switch should turn off all value pre-processing (e.g. lowercasing property names or values) as well.
2df0e97
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 don't understand why we need to add a switch to turn it off. I can't think of any meaning.
2df0e97
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 actually can't think of a use case for either of these right now. Maybe we should implement this feature without a switch first until a use case appears. If you can think of a case for which this would be useful to have short term, we should probably continue the discussion though.
I've added an issue to EditorConfig core for defaulting tab_width to indent_size.
I think in general it might be a good idea to plan out what switches EditorConfig core can accept so we can more easily maintain backwards compatibility after adding them. I've created an issue for this topic as well.