aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Arcangeli <stevearc@stevearc.com>2023-08-25 15:05:05 -0700
committerSteven Arcangeli <stevearc@stevearc.com>2023-08-25 15:05:05 -0700
commite4fb730a9ca718d50a7d9388c22adaa49b7569ad (patch)
tree6efaec93e5e6dc7a18d509e78a26fd418aa477e7
parent33ee8ba8cb6f29caec1edf01fa4987bbae52f18b (diff)
doc: fix condition example in README
-rw-r--r--README.md7
1 files changed, 3 insertions, 4 deletions
diff --git a/README.md b/README.md
index 7fa3fe6..70145e5 100644
--- a/README.md
+++ b/README.md
@@ -228,9 +228,8 @@ require("conform").setup({
-- When cwd is not found, don't run the formatter (default false)
require_cwd = true
-- When returns false, the formatter will not be used
- condition = function(bufnr)
- local basename = vim.api.nvim_buf_get_name(bufnr)
- return vim.fs.basename(bufname) ~= "README.md"
+ condition = function(ctx)
+ return vim.fs.basename(ctx.filename) ~= "README.md"
end,
-- Exit codes that indicate success (default {0})
exit_codes = { 0, 1 },
@@ -264,7 +263,7 @@ Format a buffer
| | lsp_fallback | `nil\|boolean` | Attempt LSP formatting if no formatters are available. Defaults to false. |
Returns:
-| Type | Desc |
+| Type | Desc |
| ------- | ------------------------------------- |
| boolean | True if any formatters were attempted |