summaryrefslogtreecommitdiffstats
path: root/lua/conform/health.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/conform/health.lua')
-rw-r--r--lua/conform/health.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/lua/conform/health.lua b/lua/conform/health.lua
index 7132007..3a1c9f6 100644
--- a/lua/conform/health.lua
+++ b/lua/conform/health.lua
@@ -12,8 +12,14 @@ local function get_formatter_filetypes(name)
local conform = require("conform")
local filetypes = {}
for filetype, formatters in pairs(conform.formatters_by_ft) do
+ if type(formatters) == "function" then
+ formatters = formatters(0)
-- support the old structure where formatters could be a subkey
- if not vim.tbl_islist(formatters) then
+ elseif not vim.tbl_islist(formatters) then
+ vim.notify_once(
+ "Using deprecated structure for formatters_by_ft. See :help conform-options for details.",
+ vim.log.levels.ERROR
+ )
---@diagnostic disable-next-line: undefined-field
formatters = formatters.formatters
end