integrate trouble with lualine

This commit is contained in:
Erik Stambaugh 2024-06-13 09:16:01 -07:00
parent ddfe595f6f
commit 956c700c71

View file

@ -1,3 +1,5 @@
require('lualine').setup {
options = {
icons_enabled = true,
@ -38,5 +40,22 @@ require('lualine').setup {
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {}
extensions = {},
opts = function(_, opts)
local trouble = require("trouble")
local symbols = trouble.statusline({
mode = "lsp_document_symbols",
groups = {},
title = false,
filter = { range = true },
format = "{kind_icon}{symbol.name:Normal}",
-- The following line is needed to fix the background color
-- Set it to the lualine section you want to use
hl_group = "lualine_c_normal",
})
table.insert(opts.sections.lualine_c, {
symbols.get,
cond = symbols.has,
})
end,
}