mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 16:39:06 +02:00
fix(ui): trouble lualine component
This commit is contained in:
parent
0daa957b3c
commit
f9fdb356f2
2 changed files with 13 additions and 15 deletions
|
@ -199,24 +199,21 @@ return {
|
|||
|
||||
-- do not add trouble symbols if aerial is enabled
|
||||
-- And allow it to be overriden for some buffer types (see autocmds)
|
||||
if
|
||||
vim.g.trouble_lualine_enabled ~= false
|
||||
and vim.b.trouble_lualine_enabled ~= false
|
||||
and LazyVim.has("trouble.nvim")
|
||||
then
|
||||
if vim.g.trouble_lualine and LazyVim.has("trouble.nvim") then
|
||||
local trouble = require("trouble")
|
||||
local symbols = trouble.statusline
|
||||
and trouble.statusline({
|
||||
mode = "symbols",
|
||||
groups = {},
|
||||
title = false,
|
||||
filter = { range = true },
|
||||
format = "{kind_icon}{symbol.name:Normal}",
|
||||
hl_group = "lualine_c_normal",
|
||||
})
|
||||
local symbols = trouble.statusline({
|
||||
mode = "symbols",
|
||||
groups = {},
|
||||
title = false,
|
||||
filter = { range = true },
|
||||
format = "{kind_icon}{symbol.name:Normal}",
|
||||
hl_group = "lualine_c_normal",
|
||||
})
|
||||
table.insert(opts.sections.lualine_c, {
|
||||
symbols and symbols.get,
|
||||
cond = symbols and symbols.has,
|
||||
cond = function()
|
||||
return vim.b.trouble_lualine ~= false and symbols.has()
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue