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

Airline theme colors go out of sync after using CoC in neovim #5

Closed
unknowledgeable opened this issue Aug 5, 2020 · 11 comments
Closed
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@unknowledgeable
Copy link
Contributor

I'm getting some strange behaviour with this airline theme where it doesn't seem to refresh the colours correctly after inserting an emmet abbreviation using CoC. I'm using the example vim config found here

Expected:
Screenshot 2020-08-05 at 13 51 49

Current behaviour:
Screenshot 2020-08-05 at 13 51 40

It seems to go back in sync to the expected behaviour if I take focus away from my terminal window and click on it again or use :AirlineRefresh
I'm not getting this problem using any other vim-airline Theme (I'm definitely using a powerline patched font, etc)

I've tried setting the theme manually with let g:airline_theme='embark' but the problem persists

Steps to reproduce with Coc, emmet-vim and coc-emmet installed:

nvim index.html
i ! <TAB> <CR>

Any thoughts?

vim version: NVIM v0.4.3
coc.nvim version: 0.0.78-0ff42027ff
term: iTerm.app
platform: darwin
all plugins up to date according to Plug

PS: Loving the theme btw! Thanks for putting out there!

@skbolton
Copy link
Collaborator

skbolton commented Aug 8, 2020

That is very weird behavior. I will have to look into this and do my best to fix. I am not an airline user though so I might have to request that you help me come to a resolution on this.

@skbolton skbolton added bug Something isn't working help wanted Extra attention is needed labels Aug 8, 2020
@unknowledgeable
Copy link
Contributor Author

@skbolton strange indeed, is there a theme you based yours on that I could test to see if I get the same behaviour?

@skbolton
Copy link
Collaborator

skbolton commented Aug 8, 2020

@unknowledgeable I basically pulled the challenger deep theme airline theme into the code base and adjusted the palette to match embark

@unknowledgeable
Copy link
Contributor Author

@skbolton I tested the challanger deep theme and it seems to work fine, odd. Had a quick scan through a diff of embark and challenger_deep but couldn't find anything obvious, but was pretty hard to see any out of place punctuation in the diff!

Might be worthwhile going through the process of replacing colours in airline's default "dark" theme instead, just for the sake of completeness and compatibility?

@skbolton
Copy link
Collaborator

skbolton commented Aug 9, 2020

Yeah I think that's a good idea. Also I wouldn't mind keeping all the comments and everything in that example. I think it will help me and anyone else out later down the road to make fixes and contributions.

@unknowledgeable
Copy link
Contributor Author

Update on this, I had a mess around with the default theme by replacing the colours with the closest matches from embark.vim and the result wasn't great:

Screenshot 2020-08-11 at 16 25 02

I much prefer the original embark one, when it works!

I'm not sure how you want to proceed with it but there are quite a few aesthetic decisions for you to make to get it looking good.

@skbolton
Copy link
Collaborator

No sync issues when you did that though?

@unknowledgeable
Copy link
Contributor Author

Nope all working fine as far as I can tell!

@skbolton
Copy link
Collaborator

Okay I will try and make time in the next few weeks to use the template like you did above but get the colors to align with what I have in the current theme.

@unknowledgeable
Copy link
Contributor Author

So in my rewrite I've got it looking like this so far and thankfully it's no longer bugging out:

ALL3

What I've done:

  • changed it so that unfocussed/inactive buffers are more obviously not in focus
  • used the purple colours that used to indicate inactive buffers for the command colours
  • added separate colours for replace mode (green) and terminal (blue)
  • made the filetype indicator match the mode colour of the statusline
  • used red to indicate when files have been changed in both the statusline and bufferline

Any thoughts or opinions?

@skbolton
Copy link
Collaborator

Closing as stale. Reopen if issue persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants