Open haunted2 opened 8 years ago
this probably is bug but as i remember if you use indent_with_space: false
and have configured sublime to indent with 2 spaces i think it will replace tabs with 2 spaces
@haunted2
In order to solve this, I had to disable PSR2 formatting and manually add all PSR2 transformations except PSR2IndentWithSpace
.
"psr2": false, // Activate PSR2 style
"passes": ["PSR2KeywordsLowerCase", "PSR2LnAfterNamespace", "PSR2CurlyOpenNextLine", "PSR2ModifierVisibilityStaticOrder", "PSR2SingleEmptyLineAndStripClosingTag", "ReindentSwitchBlocks"],
"exclude": ["ReindentComments", "StripNewlineWithinClassBody"]
PSR-2 requires 4 spaces. You can't enable PSR-2 and use 2 spaces.
1) Settings -> Insert Spaces switch off that setting. 2) Then you will see Editor: Insert Spaces, click that and switch this off as well. 3) Then click Editor: Detect Indentation and switch it off, if your file already contains tabs with 4, because it will auto-detect and switch back to 4 when opened for that file.
Hello, i used the "indent_with_space": 2 option but it still uses 4 spaces. I also tried with "indent_with_space": true but i'ts still the same. tab_size is always set to 2. Any hint? Thanks.