From 0156beb8397169d7ec18d4f4ea8dd002ee9bcc96 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 2 Oct 2023 21:05:51 +0200 Subject: fix: injected formatter silent failure on nvim nightly (#100) --- lua/conform/formatters/injected.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lua/conform') diff --git a/lua/conform/formatters/injected.lua b/lua/conform/formatters/injected.lua index 5ba8e0a..8fb8226 100644 --- a/lua/conform/formatters/injected.lua +++ b/lua/conform/formatters/injected.lua @@ -62,7 +62,11 @@ return { callback("No treesitter parser for buffer") return end - parser:parse() + --- Disable diagnostic to pass the typecheck github action + --- This is available on nightly, but not on stable + --- Stable doesn't have any parameters, so it's safe to always pass `true` + ---@diagnostic disable-next-line: redundant-parameter + parser:parse(true) local root_lang = parser:lang() local regions = {} for lang, child_tree in pairs(parser:children()) do -- cgit v1.2.3-70-g09d2