From 436c215d91c8c1cba840318e11bd774faf00845a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 31 May 2024 14:07:09 +0200 Subject: [PATCH] refactor: make trouble lualine an option --- lua/lazyvim/config/options.lua | 3 +++ lua/lazyvim/plugins/ui.lua | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index a1150151..1531ef53 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -28,6 +28,9 @@ vim.g.lazygit_config = true -- Hide deprecation warnings vim.g.deprecation_warnings = false +-- Show the current document symbols location from Trouble in lualine +vim.g.trouble_lualine = true + local opt = vim.opt opt.autowrite = true -- Enable auto write diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index bb0a31f4..190544a2 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -209,7 +209,7 @@ return { } -- do not add trouble symbols if aerial is enabled - if not LazyVim.has("aerial.nvim") then + if vim.g.trouble_lualine then local trouble = require("trouble") local symbols = trouble.statusline and trouble.statusline({