From 9a2f7730907fd9124ec536f8dc2ad0a253f18f36 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 28 Mar 2024 22:48:09 +0100 Subject: [PATCH] fix(trouble): show message if use hasnt updated with Lazy yet after enabling the extra --- lua/lazyvim/plugins/extras/editor/trouble-v3.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/lazyvim/plugins/extras/editor/trouble-v3.lua b/lua/lazyvim/plugins/extras/editor/trouble-v3.lua index 0de564b5..a5487888 100644 --- a/lua/lazyvim/plugins/extras/editor/trouble-v3.lua +++ b/lua/lazyvim/plugins/extras/editor/trouble-v3.lua @@ -31,6 +31,11 @@ return { optional = true, opts = function(_, opts) local trouble = require("trouble") + if not trouble.statusline then + LazyVim.error("You have enabled the **trouble-v3** extra,\nbut still need to update it with `:Lazy`") + return + end + local symbols = trouble.statusline({ mode = "lsp_document_symbols", groups = {},