aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMads Hougesen <mads@mhouge.dk>2024-06-01 21:14:43 +0200
committerGitHub <noreply@github.com>2024-06-01 12:14:43 -0700
commit8b147ca7abccbb19dd952dbb7aeebcdd56b02aee (patch)
tree8ff97bf7ef83461a64a9cdd54f3fa83716df3a85
parentfb3810a02267cd9ec55dd359c747634341a9ed07 (diff)
feat(python): support pyink (#427)
* feat: support pyink * doc: shorten pyink description --------- Co-authored-by: Steven Arcangeli <506791+stevearc@users.noreply.github.com>
-rw-r--r--README.md1
-rw-r--r--doc/conform.txt1
-rw-r--r--lua/conform/formatters/pyink.lua15
3 files changed, 17 insertions, 0 deletions
diff --git a/README.md b/README.md
index 327a523..ad604cd 100644
--- a/README.md
+++ b/README.md
@@ -285,6 +285,7 @@ You can view this list in vim with `:help conform-formatters`
- [pretty-php](https://github.com/lkrms/pretty-php) - The opinionated PHP code formatter.
- [puppet-lint](https://github.com/puppetlabs/puppet-lint) - Check that your Puppet manifests conform to the style guide.
- [purs-tidy](https://github.com/natefaubion/purescript-tidy) - A syntax tidy-upper for PureScript.
+- [pyink](https://github.com/google/pyink) - Pyink, pronounced pī-ˈiŋk, is a Python formatter, forked from Black with a few different formatting behaviors.
- [reorder-python-imports](https://github.com/asottile/reorder-python-imports) - Rewrites source to reorder python imports
- [rescript-format](https://rescript-lang.org/) - The built-in ReScript formatter.
- [roc](https://github.com/roc-lang/roc) - A fast, friendly, functional language.
diff --git a/doc/conform.txt b/doc/conform.txt
index 46a2e00..cbfe1c1 100644
--- a/doc/conform.txt
+++ b/doc/conform.txt
@@ -348,6 +348,7 @@ FORMATTERS *conform-formatter
`pretty-php` - The opinionated PHP code formatter.
`puppet-lint` - Check that your Puppet manifests conform to the style guide.
`purs-tidy` - A syntax tidy-upper for PureScript.
+`pyink` - Pyink, pronounced pī-ˈiŋk, is a Python formatter, forked from Black with a few different formatting behaviors.
`reorder-python-imports` - Rewrites source to reorder python imports
`rescript-format` - The built-in ReScript formatter.
`roc` - A fast, friendly, functional language.
diff --git a/lua/conform/formatters/pyink.lua b/lua/conform/formatters/pyink.lua
new file mode 100644
index 0000000..cce1059
--- /dev/null
+++ b/lua/conform/formatters/pyink.lua
@@ -0,0 +1,15 @@
+---@type conform.FileFormatterConfig
+return {
+ meta = {
+ url = "https://github.com/google/pyink",
+ description = "A Python formatter, forked from Black with a few different formatting behaviors.",
+ },
+ command = "pyink",
+ args = {
+ "--stdin-filename",
+ "$FILENAME",
+ "--quiet",
+ "-",
+ },
+ stdin = true,
+}