15
submitted 6 months ago* (last edited 6 months ago) by Dirk@lemmy.ml to c/neovim@programming.dev

Update: Based on the discussion here and in other places I added the following (well, technically I did something different in my colorscheme, but in the end it translates to that)

vim.api.nvim_set_hl(0, 'Normal', {})

This reverts the weird text and background colors to the previous behavior of ... not setting them.


With update 0.10 Neovim behavior changed regarding text color and background color.

I use a color theme that does not set those and previously this worked perfectly fine. Neovim simply used the font color defined in the terminal and had a transparent background.

Now the background is #14161b and the font color is #e0e2ea. Neither of the colors is configured ANYWHERE in my whole setup. Neither in the colorscheme, nor in my terminal configuration, nor in my Neovim configuration.

Is there a sane way to revert this to the old behavior? (i.e. use the font color configured in the terminal’s configuration and use transparent background.)

you are viewing a single comment's thread
view the rest of the comments
[-] Dirk@lemmy.ml 1 points 6 months ago

This looks fine when doing it manually, thanks. I wonder how to properly implementing this in my Lua-only setup without just wrapping it in vim.cmd.

[-] sudo@programming.dev 2 points 6 months ago

Its something like vim.nvim_api_set_hl

[-] metiulekm@sh.itjust.works 2 points 6 months ago

I looked at material.nvim randomly, and they use vim.api.nvim_set_hl to set their colors. It seems that the equivalent of the above command is :lua vim.api.nvim_set_hl(0, "Normal", {}).

this post was submitted on 24 May 2024
15 points (82.6% liked)

Neovim

2186 readers
1 users here now

founded 1 year ago
MODERATORS