aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorFolke Lemaitre <folke.lemaitre@gmail.com>2023-10-02 21:05:51 +0200
committerGitHub <noreply@github.com>2023-10-02 12:05:51 -0700
commit0156beb8397169d7ec18d4f4ea8dd002ee9bcc96 (patch)
tree7b3ca8d640ac141df6ad7fe172f8c6a788f71c99 /lua
parent83201df55ecdbd1c378f56cf7314cb3030a17fa4 (diff)
fix: injected formatter silent failure on nvim nightly (#100)
Diffstat (limited to 'lua')
-rw-r--r--lua/conform/formatters/injected.lua6
1 files changed, 5 insertions, 1 deletions
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