Closed fregante closed 7 years ago
Please open an issue on the main EditorConfig repo. Sorry for the confusion, but this doesn't just concern the js core. It concerns all EditorConfig plugins.
It seems to me that editors themselves should ignore these settings for text files, no matter how they are set by the plugins. Which editor are you using? I would rather report the issue to the editor developers.
@xuhdev what do you mean "for text files"? The request here is to have EditorConfig ignore binary files. This would be relevant for all cores to somehow detect whether a file is a binary type or not.
@xuhdev The tool I'm using told me that EditorConfig itself should handle binary files : https://github.com/jedmao/eclint/issues/45#event-925881562
@jedmao What I meant was, an option such as indent_size
is not meaningful for binary files. When the plugin sets the corresponding editor option, the editor itself should handle it well by ignoring it -- it ought not to be the responsibility of the plugins nor the cores, except perhaps a few exceptions. Does it make sense?
Ahh, @xuhdev I see what you mean now and I'm inclined to agree w/ you. Even better is that this is already how things work today; thus, there's nothing to do here.
That said, @bfred-it, one thing you can do to ignore binary files is this:
root = true;
[*]
indent_size = 4
[*.png]
indent_size = unset
See https://github.com/editorconfig/editorconfig/issues/285#issuecomment-267400370
this is already how things work today
Where? This issue is about excluding binary files automatically rather than manually via (potentially-lengthy and incomplete) config
I think this is really an issue of eclint... I tend to consider that eclint should automatically detect binary files. mime-types may be helpful for this job.
EditorConfig's
*
applies to all files, but should it?Does this make sense or should it output nothing on binary files?
Should the editor/tool have to include this check instead?