From a1c5886947e20059ad7802e71e0a82b413af6657 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 6 Oct 2023 09:26:14 +0200 Subject: [PATCH] feat(conform): ignore formatting errors for injected languages and fix condition example --- lua/lazyvim/plugins/extras/formatting/conform.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/formatting/conform.lua b/lua/lazyvim/plugins/extras/formatting/conform.lua index b2975882..44f4ba40 100644 --- a/lua/lazyvim/plugins/extras/formatting/conform.lua +++ b/lua/lazyvim/plugins/extras/formatting/conform.lua @@ -33,9 +33,10 @@ return { -- You can also define any custom formatters here. ---@type table formatters = { + injected = { options = { ignore_errors = true } }, -- -- Example of using dprint only when a dprint.json file is present -- dprint = { - -- condition = function(ctx) + -- condition = function(self, ctx) -- return vim.fs.find({ "dprint.json" }, { path = ctx.filename, upward = true })[1] -- end, -- },