Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transparent background, lightline, and certain terminals #43

Closed
roosta opened this issue May 31, 2019 · 4 comments
Closed

transparent background, lightline, and certain terminals #43

roosta opened this issue May 31, 2019 · 4 comments

Comments

@roosta
Copy link
Member

roosta commented May 31, 2019

Found an issue where if transparent background is enabled, and running termite w/o tmux, the lightline normal colors are not applied until the config is re-sourced.

vim

It works correctly in urxvt, and I've tried gnome terminal and there the issue is present.
The weird thing is that it only happens sometimes, not every time vim is launched.

It works as expected in tmux, and seeing as the only usecase for transparent background involves tmux this isn't a huge issue but annoying none the less.

I do not know how this could be fixed though, but I'll leave this issue here if anyone else experience the same issue.

@roosta
Copy link
Member Author

roosta commented May 31, 2019

Also it is this snippet right here that cause the issue:

if g:srcery_transparent_background == 1 && !has('gui_running')
  call s:HL('Normal', s:bright_white, s:none)
 else
  call s:HL('Normal', s:bright_white, s:black)
endif

If I remove the conditional and simply set it to s:black it works as expected.

@roosta
Copy link
Member Author

roosta commented May 31, 2019

Ok, starting to suspect this is my fault somehow, not related to srcery or lightline. I am not able to reproduce this issue using a barebones config:

set nocompatible
filetype off
set rtp+=~/.vim/plugged/lightline.vim
set rtp+=~/src/srcery-vim
filetype plugin indent on
syntax enable
let g:srcery_transparent_background=1
colorscheme srcery
set laststatus=2
let g:lightline = {
      \ 'colorscheme': 'srcery',
      \ }

@roosta
Copy link
Member Author

roosta commented May 31, 2019

Ok this is getting weirder by the minute. Seems if I remove the plugin YankRing, lightline colors are applied like normal on startup.

@roosta
Copy link
Member Author

roosta commented May 31, 2019

I was able to fix this by setting set background=dark at the top of the scheme. Why this works I honestly don't know, but seems like a good bet including this option regardless.

I was also able to get lightline to set colors correctly by removing hi clear from the prelude, but removing that seems unwise. It seems to be related somehow though.

It's bee a frustrating couple of hours of debugging, so I'll take it even though why this happens is still a bit of a mystery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant