fix(lualine): only show one Lualine component for symbols (#3514)

Fixes #3511
This commit is contained in:
Iordanis Petkakis
2024-06-07 13:12:05 +03:00
committed by GitHub
parent 119dcb949a
commit 827aa5380a
2 changed files with 29 additions and 25 deletions

View File

@ -104,6 +104,7 @@ return {
"nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
optional = true, optional = true,
opts = function(_, opts) opts = function(_, opts)
if not vim.g.trouble_lualine then
table.insert(opts.sections.lualine_c, { table.insert(opts.sections.lualine_c, {
"aerial", "aerial",
sep = " ", -- separator between symbols sep = " ", -- separator between symbols
@ -125,6 +126,7 @@ return {
-- Color the symbol icons. -- Color the symbol icons.
colored = true, colored = true,
}) })
end
end, end,
}, },
} }

View File

@ -29,6 +29,7 @@ return {
"nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
optional = true, optional = true,
opts = function(_, opts) opts = function(_, opts)
if not vim.g.trouble_lualine then
table.insert(opts.sections.lualine_c, { table.insert(opts.sections.lualine_c, {
function() function()
return require("nvim-navic").get_location() return require("nvim-navic").get_location()
@ -37,6 +38,7 @@ return {
return package.loaded["nvim-navic"] and require("nvim-navic").is_available() return package.loaded["nvim-navic"] and require("nvim-navic").is_available()
end, end,
}) })
end
end, end,
}, },
} }