Skip to content

Commit 5886240

Browse files
fbuchlakF1lipB
authored andcommitted
feat: add pretty-php (nvim-lua#161)
1 parent d470536 commit 5886240

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ You can view this list in vim with `:help conform-formatters`
234234
- [pint](https://github.com/laravel/pint) - Laravel Pint is an opinionated PHP code style fixer for minimalists.
235235
- [prettier](https://github.com/prettier/prettier) - Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.
236236
- [prettierd](https://github.com/fsouza/prettierd) - prettier, as a daemon, for ludicrous formatting speed.
237+
- [pretty-php](https://github.com/lkrms/pretty-php) - The opinionated PHP code formatter
237238
- [puppet-lint](https://github.com/puppetlabs/puppet-lint) - Check that your Puppet manifests conform to the style guide.
238239
- [rubocop](https://github.com/rubocop/rubocop) - Ruby static code analyzer and formatter, based on the community Ruby style guide.
239240
- [rubyfmt](https://github.com/fables-tales/rubyfmt) - Ruby Autoformatter! (Written in Rust)

doc/conform.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ FORMATTERS *conform-formatter
246246
take the maximum line length into account, wrapping code when
247247
necessary.
248248
`prettierd` - prettier, as a daemon, for ludicrous formatting speed.
249+
`pretty-php` - The opinionated PHP code formatter
249250
`puppet-lint` - Check that your Puppet manifests conform to the style guide.
250251
`rubocop` - Ruby static code analyzer and formatter, based on the community Ruby
251252
style guide.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
local util = require("conform.util")
2+
3+
---@type conform.FileFormatterConfig
4+
return {
5+
meta = {
6+
url = "https://github.com/lkrms/pretty-php",
7+
description = "The opinionated PHP code formatter",
8+
},
9+
command = util.find_executable({
10+
"vendor/bin/pretty-php",
11+
}, "pretty-php"),
12+
args = { "$FILENAME" },
13+
stdin = false,
14+
}

0 commit comments

Comments
 (0)