laravel/pint

Ability to use 2 Spaces

已關閉

#369 建立於 2025年4月25日

 (6 則留言) (14 個反應) (0 位負責人)PHP (189 個分叉)user submission
help wanted

倉庫指標

星標
 (3,127 顆星)
PR 合併指標
 (平均合併 2天 1小時) (30 天內合併 12 個 PR)

描述

Pint Version

1.22

PHP Version

8.2

Description

Add the ability to set the spaces to 2 spaces like php-cs-fixer does. Currently, Pint forces the user into using 4 spaces without the ability to change it. Pint overrides VS Code's .editorconfig, settings.json, *.code-workspace, nor provides the ability to use php-cs-fixer's setIndent(...)

Please add this ability.

Steps To Reproduce

  1. Create a new Laravel project with Pint enabled
  2. Open project with VS Code
  3. Set the IDE to use 2 spaces via .editorconfig, settings.json, or *.code-workspace
  4. Run pint

Outcome:

System enforces 4 spaces

貢獻者指南