You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like on my particular colorscheme, the syntax file errors out with:
E420: BG color unknown
It happens on this line:
hi cdeckInvisible guifg=bg guibg=bg ctermbg=bg ctermfg=bg
The problem, I think, is that the "bg" color only works if the Normal syntax group has a set background. In my case (a custom colorscheme), it looks like this:
Even if I set ctermbg=NONE, it's the same issue -- it seems like it only works if there's a concrete color set, or I might be doing something wrong. The reason I'm not setting a specific color is because I'm using transparency in my terminal, so I'd like to keep this functionality.
Unfortunately, I'm not sure what a solution might look like. It would be nice if there was a way to check if "bg" was defined. This could work as a best-effort kind of thing, maybe:
tryhi cdeckInvisible guifg=bg guibg=bg ctermbg=bg ctermfg=bgcatch/E420:/" No "bg" set, let's try our best to hide it:if &background=='dark'hi cdeckInvisible guifg=Black guibg=Black ctermbg=Black ctermfg=Black
elseif &background=='light'hi cdeckInvisible guifg=White guibg=White ctermbg=White ctermfg=White
endifendtry
I've attached #3 as a PR that implements this fix.
The text was updated successfully, but these errors were encountered:
It seems like on my particular colorscheme, the syntax file errors out with:
It happens on this line:
The problem, I think, is that the "bg" color only works if the
Normal
syntax group has a set background. In my case (a custom colorscheme), it looks like this:Even if I set
ctermbg=NONE
, it's the same issue -- it seems like it only works if there's a concrete color set, or I might be doing something wrong. The reason I'm not setting a specific color is because I'm using transparency in my terminal, so I'd like to keep this functionality.Unfortunately, I'm not sure what a solution might look like. It would be nice if there was a way to check if "bg" was defined. This could work as a best-effort kind of thing, maybe:
I've attached #3 as a PR that implements this fix.
The text was updated successfully, but these errors were encountered: