trouble.nvim
trouble.nvim copied to clipboard
bug: Incorrect Lualine Highlight
Did you check docs and existing issues?
- [X] I have read all the trouble.nvim docs
- [X] I have updated the plugin to the latest version before submitting this issue
- [X] I have searched the existing issues of trouble.nvim
- [X] I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
0.10.1
Operating system/version
MacOS 14.6.1
Describe the bug
The symbols and separators in Lualine have inconsistent highlights.
Steps To Reproduce
- Use a color scheme, for example,
"gbprod/nord.nvim"
return {
"gbprod/nord.nvim",
priority = 100,
lazy = false,
config = function()
vim.cmd.colorscheme("nord")
end,
}
- Insert trouble statusline component into into winbar.
Lualine configuration like this:
{
"nvim-lualine/lualine.nvim",
lazy = false,
dependencies = {
"nvim-tree/nvim-web-devicons",
},
config = function()
local c = require("nord.colors").palette
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",
})
require("lualine").setup({
winbar = {
lualine_c = {
{
symbols.get,
cond = symbols.has,
},
},
},
})
end,
},
Expected Behavior
The symbols and separators in Lualine have should have the same background.
Repro
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
require("lazy.minit").repro({
spec = {
{
"folke/trouble.nvim",
},
{
"neovim/nvim-lspconfig",
lazy = false,
config = function()
require("lspconfig").lua_ls.setup({})
end,
},
-- add any other plugins here
{
"gbprod/nord.nvim",
priority = 100,
lazy = false,
config = function()
vim.cmd.colorscheme("nord")
end,
},
{
"nvim-lualine/lualine.nvim",
lazy = false,
dependencies = {
"nvim-tree/nvim-web-devicons",
},
config = function()
local c = require("nord.colors").palette
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",
})
require("lualine").setup({
winbar = {
lualine_c = {
{
symbols.get,
cond = symbols.has,
},
},
},
})
end,
},
},
})