From 659838ff4244ef6af095395ce68aaaf99fa8e696 Mon Sep 17 00:00:00 2001 From: Steven Arcangeli <506791+stevearc@users.noreply.github.com> Date: Wed, 6 Dec 2023 22:20:29 -0800 Subject: 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)`. --- lua/conform/formatters/stylua.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/conform/formatters/stylua.lua') diff --git a/lua/conform/formatters/stylua.lua b/lua/conform/formatters/stylua.lua index d971932..25012bf 100644 --- a/lua/conform/formatters/stylua.lua +++ b/lua/conform/formatters/stylua.lua @@ -7,7 +7,7 @@ return { }, command = "stylua", args = { "--search-parent-directories", "--stdin-filepath", "$FILENAME", "-" }, - range_args = function(ctx) + range_args = function(self, ctx) local start_offset, end_offset = util.get_offsets_from_range(ctx.buf, ctx.range) return { "--search-parent-directories", -- cgit v1.2.3-70-g09d2