kokororin / vscode-phpfmt

Integrates phpfmt into VS Code
https://marketplace.visualstudio.com/items?itemName=kokororin.vscode-phpfmt
BSD 3-Clause "New" or "Revised" License
129 stars 30 forks source link

Feature request: phpfmt.indent_with_space work with 2-8, not just even numbers #108

Closed still-dreaming-1 closed 1 year ago

still-dreaming-1 commented 1 year ago

I'm trying to set this to 3. It seems like this setting should work with any number greater than or equal to 2 and less than or equal to 8, but for some reason it only supports even numbers in the drop down list. I tried editing the settings file directly and changing it to 3, but even there it says "Value is not accepted. Valid values: false, 2, 4, 6, 8."

I know a tab size of 3 spaces is unusual, but that's only because it's unusually awesome. I find 4 to be too long for me and 2 to be too short for me. With a length of 4 spaces, it's not terrible, but it's just unnecessary. Any size larger than necessary will cause lines to become too long sooner than they need to. An indentation size of 2 spaces is not visually distinguishable enough for me.

I tried going straight for a PR before filing an issue, even though I am not familiar with VSCode extension development. I did a search in the repo (directly from the website) for the code indent_with_space. I didn't see anything that would prevent 3 from working or being accepted, so I'm not sure what to change.

still-dreaming-1 commented 1 year ago

I found what seems like the right code to change and opened a PR for this.