From 0cfa49f4b42ba23068d436fff7bcf90d8d64399b Mon Sep 17 00:00:00 2001 From: jpridemore-allegion Date: Wed, 17 Jul 2024 23:01:52 -0600 Subject: [PATCH] feat(lualine): allow for trouble_lualine to be overriden on buffer --- lua/lazyvim/plugins/ui.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 14a77ce4..c5224b22 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -198,7 +198,10 @@ return { } -- do not add trouble symbols if aerial is enabled - if vim.g.trouble_lualine and LazyVim.has("trouble.nvim") then + -- And allow it to be overriden for some buffer types (see autocmds) + local trouble_lualine_enabled = vim.b.trouble_lualine == nil or vim.b.trouble_lualine + trouble_lualine_enabled = trouble_lualine_enabled and vim.g.trouble_lualine + if trouble_lualine_enabled and LazyVim.has("trouble.nvim") then local trouble = require("trouble") local symbols = trouble.statusline and trouble.statusline({