diff options
author | nedia <aiden@nedia.dev> | 2023-09-27 16:42:29 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-26 20:42:29 -0700 |
commit | e691ecaf41139a68ccb79fde824cb534ca11abd2 (patch) | |
tree | ec6fc517b74e5b0d4901c75f153c5382505c1843 /lua/conform/formatters | |
parent | 9e1fcd5cafc42b5dfbe2e942ddbece0dada4e1d0 (diff) |
feat: Add support for php-cs-fixer (#78)
* feat(php-cs-fixer): Add support for php-cs-fixer
* chore: Update README
* fix(php-cs-fixer): Include meta
* fix(php-cs-fixer): And include type annotation
* fix(php-cs-fixer): Use find_executable instead of path_or
Diffstat (limited to 'lua/conform/formatters')
-rw-r--r-- | lua/conform/formatters/php_cs_fixer.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lua/conform/formatters/php_cs_fixer.lua b/lua/conform/formatters/php_cs_fixer.lua new file mode 100644 index 0000000..e63ec42 --- /dev/null +++ b/lua/conform/formatters/php_cs_fixer.lua @@ -0,0 +1,15 @@ +local util = require("conform.util") + +---@type conform.FileFormatterConfig +return { + meta = { + url = "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer", + description = "The PHP Coding Standards Fixer.", + }, + command = util.find_executable({ + "tools/php-cs-fixer/vendor/bin/php-cs-fixer", + "vendor/bin/php-cs-fixer", + }, "php-cs-fixer"), + args = { "fix", "$FILENAME" }, + stdin = false, +} |