LunarVim / LunarVim

🌙 LunarVim is an IDE layer for Neovim. Completely free and community driven.
https://www.lunarvim.org
GNU General Public License v3.0
18.39k stars 1.51k forks source link

Git branch symbol not visible in all colorschemes except Lunar #3871

Closed antoineco closed 1 year ago

antoineco commented 1 year ago

Problem description

Since 57c159fe3c4aec49aeb5a4df78275e7092fc21fa, the statusline icon for lvim.core.lunaline.components.branch blends with the background in all colorschemes except lunar.

This could probably be avoided by applying a highlight group by default. I'm not sure I understand why SLGitIcon was "reserved" for the lunar colorscheme, with its color enforced outside of the colorscheme. It feels like something that colorschemes could easily override, but instead users now need to apply that change manually.

Is somebody able to provide some context?


colorscheme everforest

Screenshot 2023-02-19 at 11 55 11

colorscheme lunar (default)

Screenshot 2023-02-19 at 11 55 31

Cross-referencing https://github.com/sainnhe/everforest/issues/115

LunarVim version

master-f43cc8e2

Neovim version (>= 0.8.0)

NVIM v0.9.0-dev-1001+gcbd4480f9

Operating system/version

macOS 13.1

Steps to reproduce

lvim.colorscheme = 'tokyonight

Screenshots

Screenshot 2023-02-19 at 12 21 22
LostNeophyte commented 1 year ago

image can't reproduce

antoineco commented 1 year ago

OK let's try this one more time:

$ rm -rfv ~/.local/share/lunarvim ~/.local/share/nvim ~/.cache/lvim ~/.cache/nvim ~/.local/bin/lvim ~/.config/lvim
$ bash <(curl https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/install.sh)
y
y
y
--------------------------------------------------------------------------------
Cloning LunarVim configuration
Cloning into '~/.local/share/lunarvim/lvim'...
remote: Enumerating objects: 16913, done.
remote: Counting objects: 100% (803/803), done.
remote: Compressing objects: 100% (312/312), done.
remote: Total 16913 (delta 516), reused 638 (delta 398), pack-reused 16110
Receiving objects: 100% (16913/16913), 13.80 MiB | 17.34 MiB/s, done.
Resolving deltas: 100% (10622/10622), done.
--------------------------------------------------------------------------------
Installing LunarVim shim
starting LunarVim bin-installer
bash ./utils/installer/install_bin.sh
You can start LunarVim by running: ~/.local/bin/lvim
Preparing Lazy setup
Initializing first time setupLazy setup complete
--------------------------------------------------------------------------------
Verifying core plugins
Verification complete!
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Thank you for installing LunarVim!!
You can start it by running: ~/.local/bin/lvim
Do not forget to use a font with glyphs (icons) support [https://github.com/ryanoasis/nerd-fonts]
$ echo 'lvim.colorscheme = "tokyonight"' >~/.config/lvim/config.lua 
$ git init ~/.config/lvim
Initialized empty Git repository in ~/.config/lvim/.git/
$ cd ~/.config/lvim && git add config.lua && git commit -m test && cd -
 1 file changed, 1 insertion(+)
 create mode 100644 config.lua
$ lvim
Screenshot 2023-02-19 at 13 40 50 Screenshot 2023-02-19 at 13 44 29
antoineco commented 1 year ago

can't reproduce -- https://github.com/LunarVim/LunarVim/issues/3871#issuecomment-1435970671

On a different system I can't reproduce either:

image

image

It's unlikely to be a Neovim bug because both versions I tried are just a couple of commits apart.


Next, I'm going to investigate whether the issue could be related to:

antoineco commented 1 year ago

Confirmed to be a glitch with the kitty terminal emulator and the font fallback mechanism on macOS: kovidgoyal/kitty#6043


kitty, with font fallback image

kitty, with patched font image

Terminal.app, with patched font image


The reason why it works with the lunar colorscheme — even in kitty — is because the SLGitIcon highlight group, used exclusively in lunar, implicitly disables bold fonts:

https://github.com/LunarVim/LunarVim/blob/23a16d93306310358efb882c4193a0fabcbda5e1/lua/lvim/core/autocmds.lua#L116

Thanks for double checking @LostNeophyte! Closing.