refactor: make trouble lualine an option

This commit is contained in:
Folke Lemaitre 2024-05-31 14:07:09 +02:00
parent f72ca7f5d3
commit 436c215d91
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 4 additions and 1 deletions

View file

@ -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

View file

@ -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({