diff options
author | Steven Arcangeli <stevearc@stevearc.com> | 2023-09-18 21:11:08 -0700 |
---|---|---|
committer | Steven Arcangeli <stevearc@stevearc.com> | 2023-09-18 21:11:50 -0700 |
commit | da5b9402bc3d114c93bc49bcbb4bf3e5c6c14527 (patch) | |
tree | 35d399b8b3459efbef74837684030bfb9c579bea | |
parent | 43d2b5c6a254f60cbd2142345d2f903e04f9db07 (diff) |
doc: remove irrelevant note about '*' filetype
-rw-r--r-- | README.md | 28 | ||||
-rw-r--r-- | doc/conform.txt | 3 | ||||
-rw-r--r-- | lua/conform/init.lua | 2 |
3 files changed, 16 insertions, 17 deletions
@@ -338,20 +338,20 @@ require("conform").formatters.my_formatter = { `format(opts, callback): boolean` \ Format a buffer -| Param | Type | Desc | | -| -------- | ---------------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| opts | `nil\|table` | | | -| | timeout_ms | `nil\|integer` | Time in milliseconds to block for formatting. Defaults to 1000. No effect if async = true. | -| | bufnr | `nil\|integer` | Format this buffer (default 0) | -| | async | `nil\|boolean` | If true the method won't block. Defaults to false. If the buffer is modified before the formatter completes, the formatting will be discarded. | -| | formatters | `nil\|string[]` | List of formatters to run. Defaults to all formatters for the buffer filetype. | -| | lsp_fallback | `nil\|boolean\|"always"` | Attempt LSP formatting if no formatters are available. Defaults to false. If "always", will attempt LSP formatting even if formatters are available (useful if you set formatters for the "*" filetype) | -| | quiet | `nil\|boolean` | Don't show any notifications for warnings or failures. Defaults to false. | -| | range | `nil\|table` | Range to format. Table must contain `start` and `end` keys with {row, col} tuples using (1,0) indexing. Defaults to current selection in visual mode | -| | id | `nil\|integer` | Passed to vim.lsp.buf.format when lsp_fallback = true | -| | name | `nil\|string` | Passed to vim.lsp.buf.format when lsp_fallback = true | -| | filter | `nil\|fun(client: table): boolean` | Passed to vim.lsp.buf.format when lsp_fallback = true | -| callback | `nil\|fun(err: nil\|string)` | Called once formatting has completed | | +| Param | Type | Desc | | +| -------- | ---------------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| opts | `nil\|table` | | | +| | timeout_ms | `nil\|integer` | Time in milliseconds to block for formatting. Defaults to 1000. No effect if async = true. | +| | bufnr | `nil\|integer` | Format this buffer (default 0) | +| | async | `nil\|boolean` | If true the method won't block. Defaults to false. If the buffer is modified before the formatter completes, the formatting will be discarded. | +| | formatters | `nil\|string[]` | List of formatters to run. Defaults to all formatters for the buffer filetype. | +| | lsp_fallback | `nil\|boolean\|"always"` | Attempt LSP formatting if no formatters are available. Defaults to false. If "always", will attempt LSP formatting even if formatters are available. | +| | quiet | `nil\|boolean` | Don't show any notifications for warnings or failures. Defaults to false. | +| | range | `nil\|table` | Range to format. Table must contain `start` and `end` keys with {row, col} tuples using (1,0) indexing. Defaults to current selection in visual mode | +| | id | `nil\|integer` | Passed to vim.lsp.buf.format when lsp_fallback = true | +| | name | `nil\|string` | Passed to vim.lsp.buf.format when lsp_fallback = true | +| | filter | `nil\|fun(client: table): boolean` | Passed to vim.lsp.buf.format when lsp_fallback = true | +| callback | `nil\|fun(err: nil\|string)` | Called once formatting has completed | | Returns: diff --git a/doc/conform.txt b/doc/conform.txt index c832643..54a3e1e 100644 --- a/doc/conform.txt +++ b/doc/conform.txt @@ -112,8 +112,7 @@ format({opts}, {callback}): boolean *conform.forma {lsp_fallback} `nil|boolean|"always"` Attempt LSP formatting if no formatters are available. Defaults to false. If "always", will attempt LSP formatting even if - formatters are available (useful if you set formatters - for the "*" filetype) + formatters are available. {quiet} `nil|boolean` Don't show any notifications for warnings or failures. Defaults to false. {range} `nil|table` Range to format. Table must contain `start` diff --git a/lua/conform/init.lua b/lua/conform/init.lua index 7c81e1e..585b7c8 100644 --- a/lua/conform/init.lua +++ b/lua/conform/init.lua @@ -283,7 +283,7 @@ end --- bufnr nil|integer Format this buffer (default 0) --- async nil|boolean If true the method won't block. Defaults to false. If the buffer is modified before the formatter completes, the formatting will be discarded. --- formatters nil|string[] List of formatters to run. Defaults to all formatters for the buffer filetype. ---- lsp_fallback nil|boolean|"always" Attempt LSP formatting if no formatters are available. Defaults to false. If "always", will attempt LSP formatting even if formatters are available (useful if you set formatters for the "*" filetype) +--- lsp_fallback nil|boolean|"always" Attempt LSP formatting if no formatters are available. Defaults to false. If "always", will attempt LSP formatting even if formatters are available. --- quiet nil|boolean Don't show any notifications for warnings or failures. Defaults to false. --- range nil|table Range to format. Table must contain `start` and `end` keys with {row, col} tuples using (1,0) indexing. Defaults to current selection in visual mode --- id nil|integer Passed to |vim.lsp.buf.format| when lsp_fallback = true |