diff options
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | lua/conform/formatters/ruff.lua | 19 |
2 files changed, 20 insertions, 0 deletions
@@ -187,6 +187,7 @@ To view configured and available formatters, as well as to see the path to the l - [prettierd](https://github.com/fsouza/prettierd) - prettier, as a daemon, for ludicrous formatting speed. - [rubocop](https://github.com/rubocop/rubocop) - Ruby static code analyzer and formatter, based on the community Ruby style guide. - [rustfmt](https://github.com/rust-lang/rustfmt) - A tool for formatting rust code according to style guidelines. +- [ruff](https://github.com/astral-sh/ruff) - An extremely fast Python linter, written in Rust. - [scalafmt](https://github.com/scalameta/scalafmt) - Code formatter for Scala. - [shellharden](https://github.com/anordal/shellharden) - The corrective bash syntax highlighter - [shfmt](https://github.com/mvdan/sh) - A shell parser, formatter, and interpreter with `bash` support. diff --git a/lua/conform/formatters/ruff.lua b/lua/conform/formatters/ruff.lua new file mode 100644 index 0000000..854ac06 --- /dev/null +++ b/lua/conform/formatters/ruff.lua @@ -0,0 +1,19 @@ +return { + meta = { + url = "https://beta.ruff.rs/docs/", + description = "An extremely fast Python linter, written in Rust.", + }, + command = "ruff", + args = { + "--fix", + "-e", + "-n", + "--stdin-filename", + "$FILENAME", + "-", + }, + stdin = true, + cwd = require("conform.util").root_file({ + "pyproject.toml", + }), +} |