JSON Not respecting code formatting settings
I have set my JSON code style to be 2 spaces for all of the indentation, yet when I go to format my `composer.json` file it formats it to 4 spaces for indentation. This happens on the most current 2019.3.1. Is there any way around this problem or a fix?
Please sign in to leave a comment.
Just checked the default settings for JSON files in PhpStorm 2019.3.1 and it turns out that 2 spaces are the default for indents and 4 spaces for tabs correspondingly. And here how it looks like for a brand new project with a code style reset to defaults:
Does it look different for you, could you please share? Just in case, did you try changing "Tab size"?
It shows correctly on the Code Style preview, but if I format my composer.json file, it uses four spaces.
http://prntscr.com/qxgxrg
Do you have anything suspicious here, like, EditorConfig mentioned?
Yes it does say EditorConfig
I removed that file and it worked. Thank you very much.