Closed tranzystorekk closed 6 months ago
Could you please share details about your terminal emulator and colorscheme configuration?
Here how the sample code renders for me on WezTerm (latest nightly) with the following colorscheme config (lazy.nvim + Neovim 0.10):
{
"sainnhe/gruvbox-material",
lazy = false,
priority = 1000,
config = function()
vim.g.gruvbox_material_enable_italic = true
vim.cmd.colorscheme('gruvbox-material')
end
},
edit: the same as above with vim.g.gruvbox_material_diagnostic_virtual_text = 'highlighted'
, which you seem to have enabled:
Another useful information would be the output of :Inspect
while the cursor is inside the problematic region. Here is mine for reference:
configuration:
{
"sainnhe/gruvbox-material",
lazy = false,
priority = 1000, -- make sure to load this before all the other start plugins
config = function()
vim.g.gruvbox_material_background = "hard"
vim.g.gruvbox_material_ui_contrast = "high"
vim.g.gruvbox_material_inlay_hints_background = "dimmed"
vim.g.gruvbox_material_dim_inactive_windows = 1
vim.g.gruvbox_material_diagnostic_virtual_text = "highlighted"
-- NOTE: Needs to be called last for the settings to take effect
vim.cmd.colorscheme("gruvbox-material")
end,
},
terminal is wezterm version: 20240203-110809-5046fc22 x86_64-pc-windows-msvc
:Inspect
:
I checked right now and this doesn't happen on my other foot
terminal config, so it probably is wezterm specific
What is the output of echo $TERM
inside your terminal? (outside of Neovim)
Does it also occur if you install and enable the wezterm
terminfo?
If you want to get the most application support out of wezterm, then you may wish to install a copy of the
wezterm
TERM definition: [instructions follow] -- https://wezfurlong.org/wezterm/config/lua/config/term.html
Does it also occur if you install and enable the
wezterm
terminfo?
Unfortunately yes, I use Wezterm on Windows to run my WSL2 linux, after adding config.term = 'wezterm'
, installing wezterm-terminfo
on WSL and ensuring echo $TERM
prints wezterm
and that infocmp
lists wezterm's caps, the issue hasn't changed
I use WezTerm on Windows 11 and run Neovim inside WSL2 (Debian 12) too.
I have to admit that I just ran out of ideas.
I'll try poking around the wezterm community, but thank you for taking the time to help me!
Okay, one more thing I forgot to mention, I'm also using zellij
in that setup, and indeed when switching it off, the highlight at least doesn't have the background color:
EDIT: changing zellij configuration to styled_underlines false
also works around the issue for now
Ah that's some progress!
Support for undercurl on Windows is currently only available in WezTerm nightly, so that would explain the absence of undercurl for you.
Cross referencing
Unless you think this report has some other value, I don't think gruvbox-material
is to blame, so I can close.
I agree that there is probably not much we can do inside the colorscheme, besides changing the default style of diagnostic texts to not use undercurl. The undercurl was a conscious design decision of sainnhe though, and my preference would be to document how users can ensure that their environment is properly configured to support it.
However, I am interested in the resolution. Terminal multiplexers have been historically problematic with things like italics, standout and fancy underlines. If we can have a note about Zellij inside the vimdoc, I'm all for it!
Hm, I tried to collect info from both wezterm and zellij, and I'm not entirely sure what to make of it:
WezTerm has been supporting undercurl for a long time on Linux and macOS, but had a dependency on ConPTY and OpenConsole (from Windows Terminal) on Windows, which added support for undercurl only recently. Wez included those updated files on Feb. 11, whereas the latest stable was released on Feb. 3. In case you haven't tried the nightly release, it might be worth giving it a shot (it has been very stable for me so far).
I can't talk authoritatively about Zellij because I have never used it. I remember having a lot of similar issues with Tmux when I wasn't setting the terminfo to tmux-256color
, but Zellij doesn't seem to require this if I understand correctly.
Some additional tests on wezterm version: 20240520-135708-b8f94c47 x86_64-pc-windows-msvc
and zellij 0.40.1
:
zellij disabled, outside of neovim:
zellij enabled, outside of neovim:
zellij disabled, in neovim:
zellij enabled, in neovim:
Looks like Zellij needs to work on its compatibility with Neovim 0.10 🙂 Thanks for sharing the result of your experiments!
After switching to neovim 0.10, my lsp error highlights started looking weird (the
3600a
text):This seems consistent with what gruvbox-material uses with
diagnostic_text_highlight = 1
, but I have that option disabled in the screenshot above.