aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorSteven Arcangeli <stevearc@stevearc.com>2023-09-13 18:47:29 -0700
committerSteven Arcangeli <stevearc@stevearc.com>2023-09-13 18:47:29 -0700
commite9cc79fd723afccb8c0c16342b913fa6e96879b0 (patch)
treefafdba0e4dac6cc9f7c5aa149b06aaeca42abc52 /README.md
parente18cdaf529b94465592d0c2afe1b62bc26155070 (diff)
doc: document the format options that are passed through to LSP formatting
Diffstat (limited to 'README.md')
-rw-r--r--README.md3
1 files changed, 3 insertions, 0 deletions
diff --git a/README.md b/README.md
index 9cf1343..b538e13 100644
--- a/README.md
+++ b/README.md
@@ -387,6 +387,9 @@ Format a buffer
| | 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 | |
Returns: