Closed isimmons closed 9 years ago
You're using multiple globs incorrectly. Please look at the example: http://editorconfig.org/
@sindresorhus are you referring to the js/css/html block? I got that from someone else' example somewhere but removing it completely and the blade.php override still doesn't work.
I'm going by the example you linked to where it overrides .js files
# Tab indentation (no size specified)
[*.js]
indent_style = tab
# Indentation override for all JS under lib directory
[lib/**.js]
indent_style = space
indent_size = 2
Thinking that would mean this would work
[*.php]
indent_style = tab
indent_size = 1
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[resources/views/**.php]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
Ok thought I had also tried simply *.blade.php
but apparently I didn't or the incorrect globing below it was causing issue, because that works. Also removed redundant configs from overrides and fixed incorrect glob.
New working config:
# editorconfig.org
root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
[*.php]
indent_style = tab
indent_size = 1
insert_final_newline = true
[*.blade.php]
indent_style = space
indent_size = 2
[*.{css,js,html}]
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false
Glad you worked it out :)
Maybe I'm missing something here so sorry if it's me and not an issue.
My .editorconfig (only one in root of laravel project
Console output:
I want views (blade.php) to use the same style as html files.
I've tried
But the settings for .php are applied to them instead of the override.