aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--lua/conform/formatters/auto_optional.lua12
2 files changed, 13 insertions, 1 deletions
diff --git a/README.md b/README.md
index 71a4369..813669e 100644
--- a/README.md
+++ b/README.md
@@ -178,6 +178,7 @@ You can view this list in vim with `:help conform-formatters`
- [alejandra](https://kamadorueda.com/alejandra/) - The Uncompromising Nix Code Formatter.
- [ast-grep](https://ast-grep.github.io/) - A CLI tool for code structural search, lint and rewriting. Written in Rust
- [astyle](https://astyle.sourceforge.net/astyle.html) - A Free, Fast, and Small Automatic Formatter for C, C++, C++/CLI, Objective-C, C#, and Java Source Code.
+- [auto-optional](https://auto-optional.daanluttik.nl/) - A tool that automatically formats Python code to conform to the PEP 8 style guide.
- [autoflake](https://github.com/PyCQA/autoflake) - Removes unused imports and unused variables as reported by pyflakes.
- [autopep8](https://github.com/hhatto/autopep8) - A tool that automatically formats Python code to conform to the PEP 8 style guide.
- [beautysh](https://github.com/lovesegfault/beautysh) - A Bash beautifier for the masses.
@@ -510,7 +511,6 @@ Retrieve the available formatters for a buffer
`list_all_formatters(): conform.FormatterInfo[]` \
List information about all filetype-configured formatters
-
### get_formatter_info(formatter, bufnr)
`get_formatter_info(formatter, bufnr): conform.FormatterInfo` \
diff --git a/lua/conform/formatters/auto_optional.lua b/lua/conform/formatters/auto_optional.lua
new file mode 100644
index 0000000..b0738dc
--- /dev/null
+++ b/lua/conform/formatters/auto_optional.lua
@@ -0,0 +1,12 @@
+---@type conform.FileFormatterConfig
+return {
+ meta = {
+ url = "https://auto-optional.daanluttik.nl/",
+ description = "Adds the Optional type-hint to arguments where the default value is None.",
+ },
+ command = "auto-optional",
+ args = {
+ "$FILENAME",
+ },
+ stdin = false,
+}