Unfortunately setting only above 2 lines is not enough to make the whole thing transparent. I’m also using some other plugins, like lualine that I was not using earlier. I’m actually using LunarVim config. And I wonder how can I find out, what are all the things for which I need to set the background to NONE. Just in case anybody could help.
You want to wrap them in an augroup for it to work when the ColorScheme event happens:
vim.cmd([[
augroup transparent_hl
au!
au ColorScheme * hi Normal guibg=NONE ctermbg=NONE
au ColorScheme * hi LineNr guibg=NONE ctermbg=NONE
augroup END
]])