From 02648aa963cbdfc2f61d588a7bd0a3e81915958c Mon Sep 17 00:00:00 2001 From: Vadim Misbakh-Soloviov Date: Sun, 22 Sep 2024 02:00:34 +0700 Subject: [PATCH] Fix for "attempt to index local 'signs' (a boolean value)" errors in nvim-0.10.1+ --- lua/trouble/format.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/trouble/format.lua b/lua/trouble/format.lua index 78e8afe3..72d150f3 100644 --- a/lua/trouble/format.lua +++ b/lua/trouble/format.lua @@ -105,7 +105,7 @@ M.formatters = { signs = signs(0, 0) --[[@as vim.diagnostic.Opts.Signs]] end return { - text = signs.text and signs.text[severity] or sign and sign.text or name:sub(1, 1), + text = type(signs) == "table" and signs.text and signs.text[severity] or sign and sign.text or name:sub(1, 1), hl = "DiagnosticSign" .. name, } else