sainnhe / everforest

🌲 Comfortable & Pleasant Color Scheme for Vim
MIT License
2.94k stars 131 forks source link

Active buffer name renders poorly in bufferline.nvim when the buffer has LSP diagnostics #121

Closed antoineco closed 1 year ago

antoineco commented 1 year ago

The highlight of the active buffer name (file name) changes based on the severity of LSP diagnostics in that buffer in akinsho/bufferline.nvim.

Currently, those colors do not match those of the colorscheme:

error error

warn warn

hint hint

info info

The logic that generates the corresponding highlight groups relies on the fg color of core LSP-related Neovim highlight groups such as DiagnosticError.

Those seem to inherit a default fg color from Neovim, although we link them in the colorscheme:

image image image image

The default fg color is assigned by Neovim ~because the linked groups don't have any, due to the undercurl style of highlights provided by the colorscheme.~ _edit: this actually occurs regardless of the set attributes._

We could address this in the colorscheme by defining BufferLineErrorDiagnosticSelected, etc. manually, but IMO it is more sound to address this in the plugin, like I did in https://github.com/nvim-lualine/lualine.nvim/pull/836, because background colors are assigned dynamically based on the plugin's (Lua) config.

antoineco commented 1 year ago

Fixed upstream in https://github.com/akinsho/bufferline.nvim/pull/738 (bufferline.nvim v4.0.0)