aboutsummaryrefslogtreecommitdiffstats
path: root/lua/conform/formatters/uncrustify.lua
diff options
context:
space:
mode:
authorSteven Arcangeli <506791+stevearc@users.noreply.github.com>2023-12-06 22:20:29 -0800
committerGitHub <noreply@github.com>2023-12-06 22:20:29 -0800
commit659838ff4244ef6af095395ce68aaaf99fa8e696 (patch)
treeb92754f2de1a225187769ed2c30e01a3ea703b3c /lua/conform/formatters/uncrustify.lua
parent8d0421a11b2944c6c059e0936a95182972921c30 (diff)
refactor!: formatter config functions take self as first argument (#233)
This is a breaking API change, but there is a shim in place that will keep existing functions working, just with a warning notification. Most people should not encounter this at all. For anyone overriding a formatter config value with a function that takes `(ctx)` as the parameter, it will need to be updated to take `(self, ctx)`.
Diffstat (limited to 'lua/conform/formatters/uncrustify.lua')
-rw-r--r--lua/conform/formatters/uncrustify.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/conform/formatters/uncrustify.lua b/lua/conform/formatters/uncrustify.lua
index 2782e96..aec93c2 100644
--- a/lua/conform/formatters/uncrustify.lua
+++ b/lua/conform/formatters/uncrustify.lua
@@ -5,7 +5,7 @@ return {
description = "A source code beautifier for C, C++, C#, ObjectiveC, D, Java, Pawn and Vala.",
},
command = "uncrustify",
- args = function(ctx)
+ args = function(self, ctx)
return { "-q", "-l", vim.bo[ctx.buf].filetype:upper() }
end,
}