aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--doc/conform.txt4
-rw-r--r--lua/conform/types.lua4
3 files changed, 6 insertions, 6 deletions
diff --git a/README.md b/README.md
index 1d3629a..3c551b8 100644
--- a/README.md
+++ b/README.md
@@ -563,8 +563,8 @@ require("conform").formatters.my_formatter = {
| ----- | ------------------------ | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| opts | `nil\|conform.setupOpts` | | |
| | formatters_by_ft | `nil\|table<string, conform.FiletypeFormatter>` | Map of filetype to formatters |
-| | format_on_save | `nil\|conform.FormatOpts\|fun(bufnr: integer): conform.FormatOpts` | If this is set, Conform will run the formatter on save. It will pass the table to conform.format(). This can also be a function that returns the table. |
-| | format_after_save | `nil\|conform.FormatOpts\|fun(bufnr: integer): conform.FormatOpts` | If this is set, Conform will run the formatter asynchronously after save. It will pass the table to conform.format(). This can also be a function that returns the table. |
+| | format_on_save | `nil\|conform.FormatOpts\|fun(bufnr: integer): nil\|conform.FormatOpts` | If this is set, Conform will run the formatter on save. It will pass the table to conform.format(). This can also be a function that returns the table. |
+| | format_after_save | `nil\|conform.FormatOpts\|fun(bufnr: integer): nil\|conform.FormatOpts` | If this is set, Conform will run the formatter asynchronously after save. It will pass the table to conform.format(). This can also be a function that returns the table. |
| | log_level | `nil\|integer` | Set the log level (e.g. `vim.log.levels.DEBUG`). Use `:ConformInfo` to see the location of the log file. |
| | notify_on_error | `nil\|boolean` | Conform will notify you when a formatter errors (default true). |
| | formatters | `nil\|table<string, conform.FormatterConfigOverride\|fun(bufnr: integer): nil\|conform.FormatterConfigOverride>` | Custom formatters and overrides for built-in formatters. |
diff --git a/doc/conform.txt b/doc/conform.txt
index 8463ac4..a3d3c2e 100644
--- a/doc/conform.txt
+++ b/doc/conform.txt
@@ -119,11 +119,11 @@ setup({opts}) *conform.setu
{opts} `nil|conform.setupOpts`
{formatters_by_ft} `nil|table<string, conform.FiletypeFormatter>` Map
of filetype to formatters
- {format_on_save} `nil|conform.FormatOpts|fun(bufnr: integer): conform.FormatOpts` I
+ {format_on_save} `nil|conform.FormatOpts|fun(bufnr: integer): nil|conform.FormatOpts` I
f this is set, Conform will run the formatter on
save. It will pass the table to conform.format().
This can also be a function that returns the table.
- {format_after_save} `nil|conform.FormatOpts|fun(bufnr: integer): conform.FormatOpts` I
+ {format_after_save} `nil|conform.FormatOpts|fun(bufnr: integer): nil|conform.FormatOpts` I
f this is set, Conform will run the formatter
asynchronously after save. It will pass the table
to conform.format(). This can also be a function
diff --git a/lua/conform/types.lua b/lua/conform/types.lua
index f68c2de..b00c3f0 100644
--- a/lua/conform/types.lua
+++ b/lua/conform/types.lua
@@ -62,8 +62,8 @@
---@class (exact) conform.setupOpts
---@field formatters_by_ft? table<string, conform.FiletypeFormatter> Map of filetype to formatters
----@field format_on_save? conform.FormatOpts|fun(bufnr: integer): conform.FormatOpts If this is set, Conform will run the formatter on save. It will pass the table to conform.format(). This can also be a function that returns the table.
----@field format_after_save? conform.FormatOpts|fun(bufnr: integer): conform.FormatOpts If this is set, Conform will run the formatter asynchronously after save. It will pass the table to conform.format(). This can also be a function that returns the table.
+---@field format_on_save? conform.FormatOpts|fun(bufnr: integer): nil|conform.FormatOpts If this is set, Conform will run the formatter on save. It will pass the table to conform.format(). This can also be a function that returns the table.
+---@field format_after_save? conform.FormatOpts|fun(bufnr: integer): nil|conform.FormatOpts If this is set, Conform will run the formatter asynchronously after save. It will pass the table to conform.format(). This can also be a function that returns the table.
---@field log_level? integer Set the log level (e.g. `vim.log.levels.DEBUG`). Use `:ConformInfo` to see the location of the log file.
---@field notify_on_error? boolean Conform will notify you when a formatter errors (default true).
---@field formatters? table<string, conform.FormatterConfigOverride|fun(bufnr: integer): nil|conform.FormatterConfigOverride> Custom formatters and overrides for built-in formatters.